0
0

Hello
I’m sorry for my poor level in english. I’m french.
I try to make a music player in C for Linux. My Linux is a Debian.
My code compile correctly and I believe that my stream is playing, but I have no sound.
Do you have an idea to solve my problem ?..

Thanks :)

Function of Initialization :
[code:f5lfi8ev]
FSOUND_SetBufferSize(100);
FSOUND_SetOutput(-1);
FSOUND_SetDriver(0);

if( !(FSOUND_Init(44100, 32, 0)) )
printf("%s\n","Init failed");
[/code:f5lfi8ev]

Function of play :
[code:f5lfi8ev]
void Lecture()
{
char champs[320], temp[64];

if((*pl).piste != NULL)
{
      strcpy(champs,(*pl).piste->chemin);
      strcpy(temp,(*pl).piste->titre);
      strcat(champs,temp);
      printf("%s\n",champs);
  FSOUND_Stream_SetBufferSize(2000);

      notre_son = FSOUND_Stream_Open(champs,FSOUND_NORMAL,0,0);
      if (notre_son == NULL)
      {
        canal=0;
        printf("%s\n", "Fichier non present !..");
      }
      else
      {
        canal=FSOUND_Stream_Play(FSOUND_FREE, notre_son);
        printf("%i\n",canal);
        FSOUND_SetVolume(canal, 100);
      }
}

}

[/code:f5lfi8ev]

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.