M.B
M.B

Reputation: 885

Is it possible to increase audio volume on system sound?

I am making piano application for iPad. I am using AudioServicesPlaySystemSound (toneSSID) for play sound of keys. But there also functionality to increase volume. But I not find how to increase sound. Can anybody help me?

Thanks.

Upvotes: 1

Views: 543

Answers (1)

SachinVsSachin
SachinVsSachin

Reputation: 6427

Add AudioStreamer.h file

Add this method to AudioStreamer.m

- (void)setVolume:(float)Level
{

OSStatus errorMsg = AudioQueueSetParameter(audioQueue, kAudioQueueParam_Volume, Level);

if (errorMsg) {
    NSLog(@"AudioQueueSetParameter returned %d when setting the volume.", errorMsg);
}

}

And handle this to audiostreamclass object like

AudioStreamer *Obj = [AudioStreamer alloc] init];

[obj setVolume:1.0];

Upvotes: 1

Related Questions