Ios 为什么增加音频增益没有';不行?
我用这行代码来设置声源的增益。我想把音量调大一些(就像iOS中的闹钟),但如果我试图将增益设置为大于1.0,则不会产生效果 文件上说Ios 为什么增加音频增益没有';不行?,ios,openal,Ios,Openal,我用这行代码来设置声源的增益。我想把音量调大一些(就像iOS中的闹钟),但如果我试图将增益设置为大于1.0,则不会产生效果 文件上说 /** * Indicate the gain (volume amplification) applied. * Type: ALfloat. * Range: ]0.0- ] * A value of 1.0 means un-attenuated/unchanged. * Each division by 2 equals an atte
/**
* Indicate the gain (volume amplification) applied.
* Type: ALfloat.
* Range: ]0.0- ]
* A value of 1.0 means un-attenuated/unchanged.
* Each division by 2 equals an attenuation of -6dB.
* Each multiplicaton with 2 equals an amplification of +6dB.
* A value of 0.0 is meaningless with respect to a logarithmic
* scale; it is interpreted as zero volume - the channel
* is effectively disabled.
*/
#define AL_GAIN 0x100A
alSourcef(source, AL_GAIN, 4.0f);//Set gain/volume - 4.0f sounds the same as 1.0f gain
我做错什么了吗?如果增益不起作用,有没有其他方法来增加音量。
谢谢值1.0表示未衰减/未改变。因此,高于1.0f的值被视为与1.0f相同。因此-每个乘以2的乘法等于+6dB的放大,只有当它小于1时才起作用?每除以2将振幅降低6dB,并且所有高于1.0f的值都不会导致音量增加。确切地可能用户必须更改设备的音量以获得更大的输出。至少对我来说,闹钟应用程序也是如此。设备声音已达到最大值,但声音仍然不够大:(我现在不接受回答,可能有人有办法提高音量。感谢澄清+1。您的声源有多大,在发送到扬声器之前,您可能需要提高音量?