inline C code

48 views
Skip to first unread message

Reginald Bailly

unread,
Feb 26, 2024, 10:54:51 AM2/26/24
to multisoft FlagShip
Hello everyone,
I asked Copilot to write me a C inline snipper for xbase that can read an mp3 file.
I got the following code
and do not know how to implement it.
Any Help?

#include "conio.h"
#include "inc/fmod.h"
function conio()
#Cinline

FSOUND_SAMPLE* handle;

int main() {
    // Initialize FMOD sound system
    FSOUND_Init(44100, 32, 0);

    // Load and play the MP3 file (replace "my.mp3" with your file name)
    handle = FSOUND_Sample_Load(0, "Echange Reginald Bailly.mp3", 0, 0, 0);
    FSOUND_PlaySound(0, handle);

    // Wait until the user hits a key to end the app
    while (!_kbhit()) {
    }

    // Clean up
    FSOUND_Sample_Free(handle);
    FSOUND_Close();
}
Reply all
Reply to author
Forward
0 new messages