Thanks to Yair Altman's SoundVolume.m I can control the system speaker output volume from MATLAB. However, MATLAB's sound output is still at a far lower level than, say, a random YouTube video or the test sound in the Realtek HD audio manager (latest version, 6.0.1.6080).
I'm using Windows 7, whose sound level controls are well known to be less than transpare开发者_如何学编程nt, but MATLAB's own control in the Windows Volume Mixer is set to max -- yet MATLAB's sound level output is way less than anything else.
Any suggestions? Here is what I'm using to play a sound (a 3kHz pure tone):
Fs = 22100;
x = 0:1/Fs:1;
y = sin(2*pi*3000.*x);
wavplay(y,22100)
Have you tried increasing the amplitude?
volume = 5; % 1 is normal, 0 is mute, >1 is louder
wavplay(y*volume, 22100);
精彩评论