Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Sound effects (SndHandle)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sound effects (SndHandle)



Hi,

I wanna add sound effects to an action game I'm developing in Java. I know quicktime is great on all kinds of media (and Java 1.1s sound support sucks, as far as I can see) so I thought that was the best choice for sound. But I don't get how to do it properly... I've tried to make a QTPlayer but that doesn't do what I need since I can't play the same sound file in a lot of tracks at the same time because I have to: "player.startTasking(); player.setRate(1);" to start playing the sound.

Anyway, before when I worked in C/C++ I did sound with SoundChannelPtr and had all the sounds as Handles, I played the sound with SndPlay(theChannel, theHandle), I had like five or six channels in an array and if isPlaying(theChannel) returned true I used the next member and if all channels where playing I ignored the sound.

I don't remember if this was SoundManager calls or QuickTime calls, but in quicktime.sound have I found something that looks very similar. Is quicktime.sound what I should use? And: Are there any kind of guide to quicktime.sound? I haven't really found anything.

Finally: I don't know if I'm just dumb but I haven't figured out how to get a sound from file into a SndHandle. How is that done?

Thanks

Best Regards Emil
ps.
Sorry if this question has been up on the list before, but I didn't find anything when I searched my archive.
ds.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.