MP3 unter Linux
-
- Beiträge: 958
- Registriert: Mo 11. Sep 2006, 22:56
-
- Beiträge: 369
- Registriert: Sa 3. Mär 2007, 16:03
- OS, Lazarus, FPC: Winux (L 0.9.xy FPC 2.2.z)
- CPU-Target: xxBit
- Wohnort: Bramsche (Emsland)
wenn ich das mache, kommt :
ich schätze das ich ne libary brauch, die irgendwas mit lgcc zu tun hat.
aber die kann ich nicht vinden
Code: Alles auswählen
Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 2.0.4 [2006/08/22] for i386
Copyright (c) 1993-2006 by Florian Klaempfl
Target OS: Linux for i386
Compiling jpegforlazarus.pas
20 Lines compiled, 0.6 sec
"Compiling package JPEGForLazarus 1.0.1" completed
Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 2.0.4 [2006/08/22] for i386
Copyright (c) 1993-2006 by Florian Klaempfl
Target OS: Linux for i386
Compiling mp3proj.lpr
mp3proj.lpr(44,78) Warning: Variable "invalid_param" does not seem to be initialized
mp3proj.lpr(30,3) Note: Local variable "ScanThread" not used
cactus_const.inc(2,7) Hint: Local const "OPEN_FILE" is not used
cactus_const.inc(3,7) Hint: Local const "ENQUEU_FILE" is not used
cactus_const.inc(4,7) Hint: Local const "OPEN_AS_NEXT" is not used
cactus_const.inc(5,7) Hint: Local const "VOLUME_UP" is not used
cactus_const.inc(6,7) Hint: Local const "VOLUME_DOWN" is not used
cactus_const.inc(7,7) Hint: Local const "NEXT_TRACK" is not used
cactus_const.inc(8,7) Hint: Local const "PREV_TRACK" is not used
cactus_const.inc(9,7) Hint: Local const "STOP_PLAYING" is not used
cactus_const.inc(10,7) Hint: Local const "START_PLAYING" is not used
mp3proj.lpr(24,21) Hint: Unit "fmodplayer" not used in mp3proj
mp3proj.lpr(25,19) Hint: Unit "functions" not used in mp3proj
mp3proj.lpr(25,24) Hint: Unit "aws" not used in mp3proj
Linking ../cactus_jukebox
/usr/bin/ld: cannot find -lgcc
Error: Error while linking
aber die kann ich nicht vinden

-
- Beiträge: 958
- Registriert: Mo 11. Sep 2006, 22:56
-
- Beiträge: 958
- Registriert: Mo 11. Sep 2006, 22:56
-
- Beiträge: 1187
- Registriert: Mi 13. Dez 2006, 10:58
- OS, Lazarus, FPC: Winux (L 1.2.xy FPC 2.6.z)
- CPU-Target: AMD A4-6400 APU
- Wohnort: Hamburg
-
- Beiträge: 1187
- Registriert: Mi 13. Dez 2006, 10:58
- OS, Lazarus, FPC: Winux (L 1.2.xy FPC 2.6.z)
- CPU-Target: AMD A4-6400 APU
- Wohnort: Hamburg
-
- Beiträge: 369
- Registriert: Sa 3. Mär 2007, 16:03
- OS, Lazarus, FPC: Winux (L 0.9.xy FPC 2.2.z)
- CPU-Target: xxBit
- Wohnort: Bramsche (Emsland)
prob gelöst 
hir der quelltext, für andere, die das selbe prob haben.
außerdem muss als globale variable noch: oss : boolean = true;

hir der quelltext, für andere, die das selbe prob haben.
Code: Alles auswählen
var
lied : PFMusicModule;
sample : pFSOUNDSAMPLE;
Soundhandle: PFSoundStream;
tmpp : pchar;
z : integer;
mp3datei : string;
begin
mp3datei :=deine musik!!! ;
{$ifdef linux}
if oss then begin
if FSOUND_SetOutput(FSOUND_OUTPUT_OSS) then writeln('Oss output openend') else writeln('failed opening oss output')
end
else begin
if FSOUND_SetOutput(FSOUND_OUTPUT_ALSA) then writeln('alsa output openend') else writeln('failed opening alsa output')
end;
{$endif}
if FSOUND_Init(44100, 32, 0)=true then begin
writeln('playing background music');
if (FileExists(mp3file)) then begin
tmpp:=StrAlloc(length(mp3file)+1);
StrPCopy(tmpp,mp3file);
if soundhandle<>nil then FSOUND_Stream_Close(Soundhandle);
Soundhandle:=FSOUND_Stream_Open(tmpp,{ FSOUND_MPEGACCURATE or FSOUND_NONBLOCKING }FSOUND_NORMAL, 0, 0); //Fixes Bug when starting VBR files first, FSOUND_NORMAL is faster!!
z:=0;
repeat begin
z:=FSOUND_Stream_GetOpenState(soundhandle);
end;
until (z=0) or (z=-3);
writeln(z);
if z = 0 then begin
FSOUND_Stream_Play (0,Soundhandle);
FSOUND_SetVolume(0, 100); //lautstÃrke
end else begin
write('error: can''t play file');writeln(z);
end;
end;
end;
end;
Zuletzt geändert von hanibal am Mi 11. Apr 2007, 18:03, insgesamt 1-mal geändert.
-
- Beiträge: 1187
- Registriert: Mi 13. Dez 2006, 10:58
- OS, Lazarus, FPC: Winux (L 1.2.xy FPC 2.6.z)
- CPU-Target: AMD A4-6400 APU
- Wohnort: Hamburg
-
- Beiträge: 369
- Registriert: Sa 3. Mär 2007, 16:03
- OS, Lazarus, FPC: Winux (L 0.9.xy FPC 2.2.z)
- CPU-Target: xxBit
- Wohnort: Bramsche (Emsland)
öhh, zwei fragen hätte ich noch, ich benutze das nähmlich für ein spiel, und da brauch man ja auch hintergrund musik.
wie kann ich machen, das die hintergrundmusik leuft, und nicht stoppt, wenn man schißt
.
und zweitens: kann man machen, das das prog startet, auch wenn die libary nicht im /usr/lib verzeichnis ist?
also, im sound losen modus oder so?
irgendwie wird dan garnicht erst der eigene code ausgefürht
wie kann ich machen, das die hintergrundmusik leuft, und nicht stoppt, wenn man schißt

und zweitens: kann man machen, das das prog startet, auch wenn die libary nicht im /usr/lib verzeichnis ist?
also, im sound losen modus oder so?
irgendwie wird dan garnicht erst der eigene code ausgefürht

-
- Beiträge: 958
- Registriert: Mo 11. Sep 2006, 22:56
Hier
http://www.pascalgamedevelopment.com/" onclick="window.open(this.href);return false;
oder hier
http://www.fmod.org/forum/" onclick="window.open(this.href);return false;
oder hier
http://www.fmod.org/docs/HTML/FSOUND.html#" onclick="window.open(this.href);return false;
wird dir sicher geholfen...
http://www.pascalgamedevelopment.com/" onclick="window.open(this.href);return false;
oder hier
http://www.fmod.org/forum/" onclick="window.open(this.href);return false;
oder hier
http://www.fmod.org/docs/HTML/FSOUND.html#" onclick="window.open(this.href);return false;
wird dir sicher geholfen...