Hey folks,
I've created a slider in my app that sets the playloudness, but this doesn't seem to change the sound of the audio played in a mobilecontrol player, i.e. mobileControlCreate "player"...
Is there any way to control the volume in this kind of player or ALL sound at once?
Thanks!
Setting volume of a mobileControlCreate "player"
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Setting volume of a mobileControlCreate "player"
See mobileSetSoundChannelVolume. You'll have to set a sound channel first.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Setting volume of a mobileControlCreate "player"
Thanks for the reply.
I've looked at info for mobilecontrolcreate and the mobileSetSoundChannelVolume, and I can't see how to set a channel that wll apply to my mobilecontrolcreate player.
https://livecode.fandom.com/wiki/MobileControlCreate
https://livecode.fandom.com/wiki/Mobile ... nelVolume
To clarify what I'm looking to do, I am playing audio through the play [audiofile.mp3] command whilst playing music at the same time using a mobilecontrolcreate player in iOS. From my research it looks like its impossible to control the volume on the mobilecontrolcreate player and only on the sounds being played through the direct 'play' command, unfortunately.
http://lists.runrev.com/pipermail/use- ... 87563.html
But just checking if any developments have been made,
Re: Setting volume of a mobileControlCreate "player"
The built-in LC docs give a little more info than the wiki page. By using the mobileSetSoundChannelVolume without an existing named channel, LC will create the channel for you. So:
Once the channel exists you can adjust the volume at any time using the mobileSetSoundChannelVolume command.
I don't think you can mix the play command with the mobile ones. But I believe you can create two different mobile channels to play simultaneously and adjust the volume separately for each. I never tried it and I'm not at my Mac right now, but if that doesn't work then create two different players with differently named channels each.
Code: Select all
mobileSetSoundChannelVolume "myChannel", 50
mobilePlaySoundOnChannel <sound>, "myChannel" , "now"
I don't think you can mix the play command with the mobile ones. But I believe you can create two different mobile channels to play simultaneously and adjust the volume separately for each. I never tried it and I'm not at my Mac right now, but if that doesn't work then create two different players with differently named channels each.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Setting volume of a mobileControlCreate "player"
Thanks for the help guys! It is now sorted