Autor Beitrag
hassedelphi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 101

WIN XP
D7 Enterprise
BeitragVerfasst: Sa 18.09.04 09:06 
hi

will mit fmod eine mp3 abspielen. mimi's sourcecode begreif ich nich wirklich. geht das nich auch einfacher?

hab mir das so vorgestellt:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.Button1Click(Sender: TObject);
begin
 fmod.FMUSIC_LoadSong('test.mp3');
 fmod.FMUSIC_PlaySong(FMUSIC_LoadSong(PChar('test.mp3')));
end;


passieren tut aber nichts.
kann jmd. helfen?

_________________
you're not be able to help, that you're an human
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Sa 18.09.04 09:16 
Ich kenne fmod zwar nicht, aber irgendwie sieht das so aus, als ob Du den Song 2x lädst.
tommie-lie
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 4373

Ubuntu 7.10 "Gutsy Gibbon"

BeitragVerfasst: Sa 18.09.04 10:05 
Kein Wunder, für MP3-Dateien musst du die Waveform-API nehmen, die fängt mit FSOUND an und nicht mit FMUSIC ;-)
Die kürzeste Form, um mit FMOD eine MP3-Datei abzuspielen ist folgende:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
var
  stream: PFSOUND_Stream;

FSOUND_Init(44100, 1, FSOUND_INIT_GLOBALFOCUS);
stream := FSOUND_Stream_Open(PChar('datei.mp3'), 0, 0, 0);
FSOUND_Play(FSOUND_FREE, stream);
FSOUND_Stream_Close(stream);
FSOUND_Close();

(not tested, only proven it correct :mrgreen:)

_________________
Your computer is designed to become slower and more unreliable over time, so you have to upgrade. But if you'd like some false hope, I can tell you how to defragment your disk. - Dilbert