iphone - SystemSoundID Sometimes Changing With Device Volume -


i playing sound effects in game using systemsoundid class, odd results. few of sounds, including landed1 below, change volume according volume buttons, others, deathsound play @ full volume. below code related 2 sounds.

systemsoundid deathsound;  systemsoundid landed1; 

...

nsurl *soundurl;

soundurl = [[nsbundle mainbundle] urlforresource:@"smpklanded1" withextension:@"mp3"];     audioservicescreatesystemsoundid ((__bridge cfurlref) soundurl, &landed1);  soundurl = [[nsbundle mainbundle] urlforresource:@"smpkdeathsound" withextension:@"mp3"];     audioservicescreatesystemsoundid ((__bridge cfurlref) soundurl, &deathsound); 

...

audioservicesplaysystemsound(landed1); 

...

audioservicesplaysystemsound(deathsound); 

why 2 act differently, if code , filetype same? makes no sense!

well, figured out, after inordinate amounts of time driving myself crazy. of them being played @ same time avaudioplayer, reason made them conform volume buttons, , weren't. obvious next step make silent avaudioplayer, have done, , program works expect.

as follow question, have clue why having avaudioplayer affects systemsoundids?


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -