Last active
July 24, 2019 16:49
-
-
Save Salies/47d4e3739cf6ec969e67ca4b3a90cbbf to your computer and use it in GitHub Desktop.
Simple audio player using BASS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include "bass.h" | |
#include "bassflac.h" | |
HSTREAM s; | |
int main(void) { | |
BASS_PluginLoad("bassflac.dll", 0); //if Windows | |
//BASS_PluginLoad("libbassflac.so", 0); //if Linux | |
BASS_Init(-1, 44100, 0, 0, NULL); | |
s = BASS_StreamCreateFile(FALSE, "Ok Goodnight - Rapture.flac", 0, 0, BASS_STREAM_AUTOFREE); //change the string for whatever filename | |
BASS_ChannelPlay(s, FALSE); | |
getchar(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment