Autor Beitrag
Mike_C
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 207

Win XP
D7 Enterprise
BeitragVerfasst: Sa 03.08.02 15:42 
Kann ich mit Delphi irgendwie die Balance de Soundkarte einstellen?
Also einstellen, ob der Sound auf beiden Boxen gleichstark ist, oder links stärker als rechts oder rechts stärker als links?

(GENAUE Beschreibungen wären hilfreich ;) )


Mike_C
Renegade
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 358

Win XP Pro, Win 7 Beta
BDS 2006
BeitragVerfasst: Fr 09.08.02 13:59 
Genaues kann ich dir nicht sagen - habe aber schonmal Komponenten gehabt mit denen man das konnte (leider gelöscht). Die hatte ich bei Torry im Zusammenhang mit MP3 gesucht und gefunden.

Gruß

Renegade

_________________
Sokrates (468 v.Chr. - 399 v.Chr.)
"Es ist keine Schande, nichts zu wissen, wohl aber, nichts lernen zu wollen."
lemming
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 470

Mac OS 10.3.1
Delphi 6 Pro, Kylix 3
BeitragVerfasst: Mi 14.08.02 15:19 
Habe ich bei meinem eigenen MP3 Player benützt.

ausblenden volle Höhe Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
uses MMSystem

function TMain.GetWaveVolume(var LVol: DWORD; var RVol: DWORD): Boolean;
var
  WaveOutCaps: TWAVEOUTCAPS;
  Volume: DWORD;
begin
  Result := False;
  if WaveOutGetDevCaps(WAVE_MAPPER, @WaveOutCaps, SizeOf(WaveOutCaps)) = MMSYSERR_NOERROR then
    if WaveOutCaps.dwSupport and WAVECAPS_VOLUME = WAVECAPS_VOLUME then
    begin
      Result := WaveOutGetVolume(WAVE_MAPPER, @Volume) = MMSYSERR_NOERROR;
      LVol   := LoWord(Volume);
      RVol   := HiWord(Volume);
    end;
end;

function TMain.SetWaveVolume(const AVolume: DWORD): Boolean;
var
  WaveOutCaps: TWAVEOUTCAPS;
begin
  Result := False;
  if WaveOutGetDevCaps(WAVE_MAPPER, @WaveOutCaps, SizeOf(WaveOutCaps)) = MMSYSERR_NOERROR then
    if WaveOutCaps.dwSupport and WAVECAPS_VOLUME = WAVECAPS_VOLUME then
      Result := WaveOutSetVolume(WAVE_MAPPER, AVolume) = MMSYSERR_NOERROR;
end;

var
  LVol: DWORD;
  RVol: DWORD;
begin
  GetWaveVolume(LVol, RVol)
end;

var
  iVol: Integer;
  iVol2: Integer;
  
begin
  SetWaveVolume(MakeLong(iVol, iVol2));
end;