News:

Welcome to RetroCoders Community

Main Menu

Using BASS library to play music in C language

Started by stigma, Jan 19, 2023, 07:19 PM

Previous topic - Next topic

stigma

#include "bass.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

#define path "D:\\C_Language_Udemy_course\\BassTest\\song1.mp3"

int main()
{   
    BASS_Init(-1, 44100, 0, 0, NULL);
    // BASS_SetVolume(1);
    HSTREAM stream=BASS_StreamCreateFile(false,path , 0, 0, 0);
    BASS_ChannelPlay(stream, false); 
    system("pause");
    return 0;
}