Delphi-Quellcode:
function GetWaveVolume: DWord;
var Woc : TWaveOutCaps;
Volume : DWord;
begin
result:=0;
if WaveOutGetDevCaps(WAVE_MAPPER, @Woc, sizeof(Woc)) =
MMSYSERR_NOERROR then begin
if Woc.dwSupport and WAVECAPS_VOLUME = WAVECAPS_VOLUME then begin
WaveOutGetVolume(Wave_Mapper, @Volume);
Result := Volume;
end;
end;
end;
procedure SetWaveVolume(const AVolume: DWord); var Woc : TWaveOutCaps;
begin
if WaveOutGetDevCaps(WAVE_MAPPER, @Woc, sizeof(Woc)) =
MMSYSERR_NOERROR then begin
if Woc.dwSupport and WAVECAPS_VOLUME = WAVECAPS_VOLUME then
WaveOutSetVolume(Wave_Mapper, AVolume);
end;
end;
[Edit]Das ist nur für die Lautstärke, Balance weiß ich auch nicht, sry.[/Edit]