Autor Beitrag
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Di 09.08.05 16:16 
user profile iconandras hat folgendes geschrieben:
ich glaub nämlich, dass hwndwinamp immmer 0 (null) ist.


Wieso glaubst du? Wende dich vertrauensvoll an deinen Debugger ;)

AXMD
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Di 09.08.05 16:18 
Hoffentlich keine blöde Frage: Läuft denn Winamp bei dir überhaupt?

_________________
We are, we were and will not be.
andras
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 460

Win XP, Win Vista Home Premium, Ubuntu Dapper Drake
Delphi 2005 Pers
BeitragVerfasst: Di 09.08.05 16:19 
ich weiß es.

Aber gibst einen anderen weg di lautstärke zu ändern, muss ja nicht gerade der sein


Moderiert von user profile iconGausi: Beiträge zusammengefasst.
TM
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 74

Win xp
D7 ET
BeitragVerfasst: Mi 07.09.05 18:24 
Hallo.

Im EH steht:

ausblenden volle Höhe Delphi-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:
uses mmsystem;

// ...

procedure GetVolume(var volL, volR: Word);
var
  hWO: HWAVEOUT;
  waveF: TWAVEFORMATEX;
  vol: DWORD;
begin
  volL:= 0;
  volR:= 0;
  // init TWAVEFORMATEX
  FillChar(waveF, SizeOf(waveF), 0);
  // open WaveMapper = std output of playsound
  waveOutOpen(@hWO, WAVE_MAPPER, @waveF, 0, 0, 0);
  // get volume
  waveOutGetVolume(hWO, @vol);
  volL:= vol and $FFFF;
  volR:= vol shr 16;
  waveOutClose(hWO);
end;


procedure SetVolume(const volL, volR: Word);
var
  hWO: HWAVEOUT;
  waveF: TWAVEFORMATEX;
  vol: DWORD;
begin
  // init TWAVEFORMATEX
  FillChar(waveF, SizeOf(waveF), 0);
  // open WaveMapper = std output of playsound
  waveOutOpen(@hWO, WAVE_MAPPER, @waveF, 0, 0, 0);
  vol:= volL + volR shl 16;
  // set volume
  waveOutSetVolume(hWO, vol);
  waveOutClose(hWO);
end;


Funtz bei meinem Player auch ohne Probleme.


..

_________________
Dieser Beitrag enthält keine Schreibfehler.
Das sind versteckte Hinweise.
Freiberger
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 130

WIN XP
Delphi 7
BeitragVerfasst: Mi 15.02.06 18:45 
Hy,
Also ich habe gerade das gleich Problem... :oops:
Ich habe ein Musik-Programm geschrieben, mit 2 TMediaplayer'n.
So wie im Windows-Media-Player sollen die Titel x Sekunden überlappen und die Lautstärke ändern.
Wie kann ich für jeden Media-Player einzeln die Lautstärke ändern ?
Oder gibt es ne andere Lösung als Media-Player ? Ich will nur MP3's abspielen...
:?:
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Do 16.02.06 11:48 
Da gibt es zahlreiche:

OpenAL, FMOD, Bass, ... Wobei FMOD und Bass bei MP3s am einfachsten sein sollten.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.