If you read the docs for mixers, you see:
Method summary for the Mixer object: createSoundObject deleteSoundObject getSoundObject() getSoundObjectList mute (Mixer) pause() (Mixer) play() (Mixer) reset (Mixer) save (Mixer) startSave (Mixer) stop() (Mixer) stopSave (Mixer) unmute (Mixer) Property summary for the Mixer object: bufferSize (Mixer) bitDepth (Mixer) channel channelCount (Mixer) elapsedTime (Mixer) filterList (Mixer) isSaving (Mixer) name (Mixer) numBuffersToPreload panMatrix (Mixer) sampleRate (Mixer) status (Mixer) soundObjectList toChannels useMatrix (Mixer) volume (Mixer)
Can you be more specific about what's not working for you? For example, the docs for createSoundObject() say (as one option):
Mixer.createSoundObject(SoundObjname, castMem, [startTime, endTime, loopCount, loopStartTime, loopEndTime, preLoadTime])
which seems self-explanatory.
put(ilk(mixer)) outputs #void. what's that about?
That might be your entire problem. Given what you posted:
mixer = member("mixerCastMember")
it should output
I've been through the docs, and I can't find anything about accessing pre-build mixer cast members through lingo. All I could find was how to access dynamically created mixers.
So I've scratched trying to use pre-built members and I'm creating them dynamically.
Here's my code:
pMusicMixer = new(#mixer)
trace( pMusicMixer.getSoundObjectList() )
[<SoundObject: bgm1 1167ce14>, <SoundObject: bgm2 1167cd60>, <SoundObject: bgm3 115fe720>, <SoundObject: bgm4 1165da14>]
Now, if I use:
shouldn't it start playing? because it's not.
or am I misunderstanding Mixer and SoundObject?
P.S. pMusicMixer.play() works. All 4 songs play at the same time. So I know the mixer is valid. I just can't seem to figure out how to play single SoundObjects withing the mixer.
As I understand it, a mixer is used to mix down a number of sounds playing simultaneously. I don't, therefore, understand why you would create one and then try to start playing a single sound you have added to it, instead of something like:
sound(3).play( [#member: member("bm1")] )
I will add, though, that I haven't spent much time with 11.5 or its new mixer objects. The documentation is scant and examples are hard to come by. You might be better off asking on directorforum or looking through some of Noisecrime's examples
I may have to convert to the old way, as you suggest. There are issues with that way, for example I lose 8 channels (using mixer gives us 16 channels rather than the 8 we used to get).
Plus mixers are much easier on sound cards from what I've heard.
But if I can't use the damn things then they're not much good to me.
If you only want to play a single sound, then load that single sound into the mixer and play it.