RetroCoders Community

C / C ++ Programming => C / C++ Libraries => Topic started by: stigma on Jan 19, 2023, 07:19 PM

Title: Using BASS library to play music in C language
Post by: stigma on Jan 19, 2023, 07:19 PM
#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;
}