0
0

Hi, i’ve a problem with volume on different platform.
If i run my app on a iphone simulator or an iPad device, i hear the sounds correctly but on iPhone device, the output comes out at very low volume.
There is an explanation for this?

  • You must to post comments
0
0

hi, what functions do you use to play the sounds?

  • You must to post comments
0
0

[quote="dav":33350k0d]hi, what functions do you use to play the sounds?[/quote:33350k0d]

[code:33350k0d]
result = system->createStream(buffer, FMOD_SOFTWARE | FMOD_LOOP_NORMAL, NULL, &samples);

result = system->playSound(FMOD_CHANNEL_FREE, samples, false, &samplesChannel);
samplesChannel->setVolume(1.0);
[/code:33350k0d]

I’ve tried to load an example from fmod sdk to the iphone and it works.
I think i did something wrong but i don’t know where…

  • You must to post comments
0
0

do you check the value of ‘result’ like in the example?

you should try to compile with the debug library and add the flag FMOD_INIT_ENABLE_PROFILE in system init to see if there is something wrong in the console (post the result here)

edit: also, try to replace your sound file with the file in the sdk example, to be sure it does not come from your file…

  • You must to post comments
0
0

The "result" value is ok every time. I’ve replaced my sample with wave.mp3 of sdk but the volume is still low…

  • You must to post comments
0
0

there must be an issue with your initialization, maybe something wrong with audio session. try to post the console log, or your code…

  • You must to post comments
0
0

[code:1g4gsj1c]
FMOD_IPHONE_EXTRADRIVERDATA extradriverdata;
memset(&extradriverdata, 0, sizeof(FMOD_IPHONE_EXTRADRIVERDATA));
extradriverdata.sessionCategory = FMOD_IPHONE_SESSIONCATEGORY_PLAYANDRECORD;

result = system->init(32, FMOD_INIT_NORMAL | FMOD_INIT_ENABLE_PROFILE, &extradriverdata);
ERRCHECK2(result);

NSString* file = @"wave.mp3";
[[NSString stringWithFormat:@"%@/%@", [[NSBundle mainBundle] resourcePath],file] getCString:buffer maxLength:200 encoding:NSASCIIStringEncoding];
result = system->createStream(buffer, FMOD_SOFTWARE | FMOD_LOOP_NORMAL, NULL, &samples);
ERRCHECK2(result);
result = system->playSound(FMOD_CHANNEL_FREE, samples, false, &samplesChannel);  
ERRCHECK2(result);  

[/code:1g4gsj1c]

Maybe the extradriverdata? It’s the only thing different from examples…

  • You must to post comments
0
0

maybe yes… it works if you remove it?

  • You must to post comments
0
0

You are using the "play and record" audio session, which means by default the iPhone OS will divert the audio from the main speaker at the base of the phone to the receiver speaker at the top.

It does this so sound doesn’t loopback as the microphone is at the base of the phone too. It will sound quieter because the receiver speaker is meant to be pressed against your ear.

If you really need the "play and record" audio session then you must either accept that it will be quieter due to the route change or tell FMOD to force the audio out the bottom (via extra driver data). See the getting started guide for details about forcing output while recording, but be aware you may get audio looping out the speaker into the microphone.

  • You must to post comments
0
0

Hi, i’m using "play and record" because i’ve a delayed record start (about 1 second) with iPad.
Setting this mode with iPad everything works fine but with iPhone 3GS the output is low.
I commented the extra driver data stuff and with iPhone 3GS works fine and the output is normal but with iPad i’ve got again the delayed record start.
Is it a bug or i don’t understand how things work?

PS: i’m sorry for my english :(

  • You must to post comments
0
0

Keep using "play and record" to avoid the OS delay when doing recordStart but also use force speaker output:

[code:3xa0e0av]extradriverdata.sessionCategory = FMOD_IPHONE_SESSIONCATEGORY_PLAYANDRECORD;
extradriverdata.forceSpeakerOutput = true;
[/code:3xa0e0av]

This will keep the volume constant but may cause feedback in the recording.

  • You must to post comments
Showing 10 results
Your Answer

Please first to submit.