This commit is contained in:
John Bintz 2022-10-10 14:57:54 -04:00
parent 6d4cdb2ba6
commit 97f57edcab

24
main.c
View File

@ -715,7 +715,6 @@ BYTE waitForSoundSignalNumber;
*/
void startBellSound(void) {
struct dtTrigger myTrigger;
struct MsgPort *TimerPort;
ULONG soundPlayResult;
// https://amigaworld.net/modules/newbb/viewtopic.php?forum=15&topic_id=39094&post_id=735120&viewmode=thread&order=0#735120
@ -738,16 +737,6 @@ void startBellSound(void) {
// https://github.com/khval/AmosKittens/blob/79f00ba3b81805b54fd4e437f667ea2eecab740d/OS/AmigaOS/animation.cpp#L128
soundPlayResult = DoDTMethodA(bellSound, NULL, NULL, (Msg) &myTrigger);
/**
TimerPort = TimerIO->tr_node.io_Message.mn_ReplyPort;
// eventually wait for the sound to stop playing
TimerIO->tr_node.io_Command = TR_ADDREQUEST;
TimerIO->tr_time.tv_secs = 2;
TimerIO->tr_time.tv_micro = 0;
SendIO((struct IORequest *)TimerIO);
*/
}
}
@ -755,20 +744,7 @@ void startBellSound(void) {
* Tear down the bell once the timer runs out.
*/
void waitForBellToFinish(void) {
struct MsgPort *TimerPort;
ULONG timerSignal;
if (bellSound) {
/**
TimerPort = TimerIO->tr_node.io_Message.mn_ReplyPort;
// TODO: move this into the main event loop, so that
// we can update the UI while the sound is finishing up?
// I'm sure there is a way to add metadata to an IO request.
// or do we need two timer.devices with two separate IOs?
// https://amigadev.elowar.com/read/ADCD_2.1/Devices_Manual_guide/node00C4.html
timerSignal = 1L << TimerPort->mp_SigBit;
*/
Wait(1 << waitForSoundSignalNumber);
DisposeDTObject(bellSound);