Game Development Community

sound issues on iphone?

by Bret Patterson · in iTorque 2D · 05/07/2009 (4:16 pm) · 9 replies

I've got a basic 8khz 16bit wave file and when I play it on the Mac in iTGB it's really loud. However when I deploy the project to my iphone and I can't even here the noise unless I put my ear right next to the speaker. And that's with the volume at 100% both in iTGB and on the phone. Anyone know of any issues with sounds I need to be aware of?

#1
05/08/2009 (2:17 am)
The audio datablock itself is setup using an audio profile i assume, check that you set a good volume in the profile (its 0.0 - 1.0 range)... If its not that, perhaps there is an issue somewhere else?
#2
05/08/2009 (5:02 am)
Yea I did that. Here's what it looks like:
new AudioDescription(SoundOnce)

{

volume = 1.0;

type = 0;

isLooping = false;

is3D = false;

};

new AudioDescription(SoundLoop)

{

volume = 1.0;

type = 0;

isLooping = true;

is3D = false;

};

new AudioProfile(human_walk_dirt)

{

filename = "~/data/audio/Step_Light_A_01.wav";

description = "SoundOnce";

preload = true;

};

And I play the sound in my behavior using:
if(mWalkingSound == NULL) {

mWalkingSound = dynamic_cast<AudioProfile*>( Sim::findObject( "human_walk_dirt" ) );
if (mWalkingSound == NULL) {
Con::errorf("Unable to find walking sound.");
}
}
if (mWalkingSound != NULL) {
alxPlay( mWalkingSound );
}

#3
05/08/2009 (6:02 am)
turns out it was my sound files. I can hear them fine on the MAc because the iTGB plays garbage when it plays sounds on the MAC. It could be my MAC mini that is the problem, not sure but it just plays loud static. Once I volume leveled the sound effect it sounds fine on the iphone.
#4
05/08/2009 (6:22 am)
yeah we have that same problem here on our mac minis...they just play static when sound is played, however on iphone/ipod touches the sound plays fine.
#5
03/30/2010 (11:05 pm)
I'm having the exact same problem described by Geoff. Sound plays correctly when I use regular TGB (both Win and Mac versions work), but when I run the project using iTGB I get garbled sound on the Mac. However, it works ok on the iPhone simulator and on the iPhone device.

Is this a known issue that is yet to be resolved? If so, I can work around the problem. Otherwise I will need to fix this somehow.
#6
03/31/2010 (7:17 am)
I have the same problem as well on my MacBook Pro. Has everyone else been using Mac minis?
#7
03/31/2010 (9:00 pm)
Actually, mine is a MacBook Pro, I should have mentioned that. Also, I'm running Mac OS X version 10.5.8.
#8
04/03/2010 (12:52 am)
My solution is that I run two separate projects, one in iTGB and one in regular TGB. Then, I do most of my development in the iTGB branch and only use the TGB branch whenever I need to test the sound. It is very easy to switch between the two versions since both the main project file and the /game folder are common between the two branches.
#9
10/20/2011 (10:31 pm)
i have a same problem, i am using mp3 file as a background its volume is so loud and good to iphone,but for sound effect using a wav files its not hear well in iphone the sound is too low even i hear via headphone...

where i can change the sound effect volume ? i already give volume in my audio profile

any suggestion please