tags:

views:

19

answers:

1

Hi everyone.

I just built a game. It already has all the sounds. But for some reasons the sound effect of the click button is still small. How could I maximize the volume. I am not sure it is because of the quality of the sound files itself or because I din't increase the volume by code? could you guys help me out. Thanks in advance. Here is my code.

-(void) play
{
    NSString *path = [NSString stringWithFormat:@"%@%@",[[NSBundle mainBundle] resourcePath],@"/menu_button_2.wav"];
    SystemSoundID soundID;
    NSURL *filePath = [NSURL fileURLWithPath:path isDirectory :NO];
    AudioServicesCreateSystemSoundID((CFURLRef)filePath ,&soundID);
    AudioServicesPlaySystemSound(soundID);
    //AudioServicesDisposeSystemSoundID (soundID);
}
A: 

From the System Sound Services Reference:

The interface does not provide level, positioning, or timing control

I would assume level implies volume.

If you use AVAudioPlayer you can set the volume from 0.0 to 1.0 with the volume property, but I am sure that opens up a new set of problem tradeoffs.

David Sowsy