Update fm_mpx.c

This commit is contained in:
T4d3o 2014-10-03 16:06:09 +02:00
parent 0bf57f9ce0
commit e814c50045
1 changed files with 6 additions and 1 deletions

View File

@ -89,6 +89,11 @@ int fm_mpx_open(char *filename, size_t len) {
// stdin or file on the filesystem?
if(filename[0] == '-') {
//Add MPD pipe support
sfinfo.format = SF_FORMAT_RAW | SF_FORMAT_PCM_16;
sfinfo.samplerate = 44100;
sfinfo.channels = 2;
if(! (inf = sf_open_fd(fileno(stdin), SFM_READ, &sfinfo, 0))) {
fprintf(stderr, "Error: could not open stdin for audio input.\n") ;
return -1;
@ -263,4 +268,4 @@ int fm_mpx_close() {
if(audio_buffer != NULL) free(audio_buffer);
return 0;
}
}