0
0

Hello everyone, i’m new on this forum and i’m french.
I’m creating a little software ( a music player) with GTK and Fmod , but i have some problems interfacing the two.
In fact when a user clik on play button, fmod must load and play the song, and i want the user to stop the music when i want but i don’t success.
Can you help me ?
titor

  • You must to post comments
0
0

I used this function but i still have problems.
Here is my code :
[code:erny4kdt]void OnPlay(GtkWidget* widget, gpointer data)//Lecture a partir du bouton play
{
FSOUND_SAMPLE * son = NULL; // NULL is significant
int channel; // sound channel

FSOUND_SetOutput ( FSOUND_OUTPUT_DSOUND );      // DirectSound
FSOUND_SetDriver ( 0 );                         // Sound Driver (default 0)
FSOUND_SetMixer ( FSOUND_MIXER_AUTODETECT );    // Mixer
FSOUND_Init ( 44100, 32, 0 );                   // 44.1 kHz and 32 channels

// Loading of our sound (2D)
son = FSOUND_Stream_Open ( FSOUND_FREE, "sound.mp3", FSOUND_HW2D, 0, 0);
channel = FSOUND_Stream_Play ( FSOUND_FREE, son, NULL, FALSE );

} [/code:erny4kdt]
What are the problems ?
titor

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.