[futurebasic] Re: [FB] Synchronous Sounds

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : April 2004 : Group Archive : Group : All Groups

From: Robert Covington <artlythere@...>
Date: Sun, 18 Apr 2004 18:37:00 -0400
On Sunday, April 18, 2004, at 05:56  PM, Darron Forehand wrote:

> The sounds in my resource file (which were originally .aiffs) were 
> exported to System 7 sounds with QuickTime Pro 6.5 as 16 bit stereo 
> sounds at 22.050 kHz if that might be of any help.  Honestly, you know 
> more about this stuff than I do...I'm just taking a shot in the dark. 
> ;)
>
> Darron
>

Ha, I am not sure I know anything anymore. It's not the sounds, as I 
pasted in 4 of yours as a test and it is still quitting. I upped the 
channels too.

So, it's going to be something really really stupid.

Yes, indeed, it doesn't pay to use older sound playing files.

Magic Obvious Bullet in FN SoundInit:

endOfSoundProc =  Proc "EndOfSoundProc"
#If CarbonLib
endOfSoundProc = Fn NewSndCallBackUPP( [endOfSoundProc + 
_FBprocToProcPtrOffset ] )
#Endif

works fine when followed by a proper set up up of  Fn SndNewChannel 
using endOfSoundProc variable.

I didn't have this in my older Derek module (Seems to be the only 
carbon change), no wonder they blew as soon as they got to the end once 
playing native in OS X...

Thankee to whomever fathomed/changed this (Alain?) I must have missed 
the code update over in beta land.

I can't tell much audible difference with your chimes but it does help 
with panned sounds like the thunder in New Mexico Sunshine (which can 
now live again, once I upgrade the graphics to full screen)

Thanks to all you technicians who have worked on this stuff (and beyond)

rc


ps...To init as stereo use _initStereo in place of _initMono in Fn 
SndNewChannel


>
>
> Robert Covington wrote:
>
>> Arghs...I'm going to have to do a re-write of my app's sound portion 
>> using your routines and see where I'm blowing up things. I get a 
>> couple of sounds, it seems like the app quits at the end of one?
>>
>> rc
>>
>>
>> Date/Time:  2004-04-18 17:18:39 -0400
>> OS Version: 10.2.8 (Build 6R73)
>> Host:       Robert-Covingtons-Computer.local.
>>
>> Command:    FB_Temp
>> PID:        716
>>
>> Exception:  EXC_BAD_INSTRUCTION (0x0002)
>> Code[0]:    0x00000002Code[1]:    0x002c3960
>>
>> Thread 0 Crashed:
>>  #0   0x002c3960 in 0x2c3960
>>  #1   0x91791718 in ProcessCmd
>>  #2   0x91793f50 in ProcessNextCmd
>>  #3   0x91794a14 in SoundComplete
>>  #4   0x917949b8 in InvokeSoundParamUPP
>>  #5   0x01dad7fc in MixerDispatch
>>  #6   0x01dac98c in MixerDispatch
>>  #7   0x01db8c50 in HALHardwareDispatch
>>  #8   0x91791c98 in SoundComponentStopSource
>>  #9   0x91791734 in ProcessCmd
>>  #10  0x91791f08 in SndDoImmediate
>>  #11  0x002c3590 in 0x2c3590
>>  #12  0x002c3cdc in 0x2c3cdc
>>
>> Thread 1:
>>  #0   0x90073ba8 in mach_msg_trap
>>  #1   0x90005ed0 in mach_msg
>>  #2   0x901489f0 in __CFRunLoopRun
>>  #3   0x90180f58 in CFRunLoopRunSpecific
>>  #4   0x94652f80 in HALRunLoop::OwnThread(void*)
>>  #5   0x946591e0 in CAPThread::Entry(CAPThread*)
>>  #6   0x90020c28 in _pthread_body
>>
>> Thread 2:
>>  #0   0x90034728 in semaphore_wait_trap
>>  #1   0x90009c18 in pthread_mutex_lock
>>  #2   0x01dc01fc in HALInputComponentDispatch
>>  #3   0x01daea7c in MixerDispatch
>>  #4   0x01dac900 in MixerDispatch
>>  #5   0x917911ac in SoundComponentGetSourceData
>>  #6   0x01dbb9d8 in HALHardwareDispatch
>>  #7   0x01dbb7f0 in HALHardwareDispatch
>>  #8   0x9464360c in IOADevice::CallIOProcs(AudioTimeStamp const&, 
>> AudioTimeStamp const&, AudioTimeStamp const&)
>>  #9   0x94643a60 in HPIOThread::PerformIO(AudioTimeStamp const&)
>>  #10  0x94642c14 in HPIOThread::WorkLoop()
>>  #11  0x9465919c in HPIOThread::ThreadEntry(HPIOThread*)
>>  #12  0x946591e0 in CAPThread::Entry(CAPThread*)
>>  #13  0x90020c28 in _pthread_body
>>
>> -- 
>>
>>
>>
>
> --
>