Sound problem on IOS

Monkey Forums/Monkey Bug Reports/Sound problem on IOS

pit(Posted 2016) [#1]
Dear,

some sound function don't work anymore on IOS.
here are the message I recieved on Xcode:
'AudioSessionInitialize' is deprecated: first deprecated in iOS 7.0
'AudioSessionSetProperty' is deprecated: first deprecated in iOS 7.0
'AudioSessionSetActive' is deprecated: first deprecated in iOS 7.0

For this code:
gxtkAudio::gxtkAudio():musicState(0),musicPlayer(0),musicVolume(1){

// BMH - set the session category to ambient (works with other music apps)
AudioSessionInitialize( NULL,NULL,NULL,NULL );
UInt32 sessionCategory=kAudioSessionCategory_AmbientSound;
AudioSessionSetProperty( kAudioSessionProperty_AudioCategory,sizeof(sessionCategory),&sessionCategory );
UInt32 allowMixWithOthers=true;
AudioSessionSetProperty( kAudioSessionProperty_OverrideCategoryMixWithOthers,sizeof(allowMixWithOthers),&allowMixWithOthers );
AudioSessionSetActive( true );

What can I do in order to play music ?

Pit


pit(Posted 2016) [#2]
one precision: now it works (I think I used an old version of my code :-/ ), but I still have the messages as Alert.
So I suppose this must be taken in account for future release of Monkey...

Pit