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?
- chiodo80 asked 6 years ago
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…
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);
Maybe the extradriverdata? It’s the only thing different from examples…
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.
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
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;
This will keep the volume constant but may cause feedback in the recording.
[quote="dav":33350k0d]hi, what functions do you use to play the sounds?[/quote:33350k0d]
result = system->createStream(buffer, FMOD_SOFTWARE | FMOD_LOOP_NORMAL, NULL, &samples);
result = system->playSound(FMOD_CHANNEL_FREE, samples, false, &samplesChannel);
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…
Please login first to submit.