use 16-bit signed ints for storing positions in the ring buffer
git-svn-id: https://svn.musicpd.org/mpd/trunk@576 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
795a1e930b
commit
e9efaeaca9
|
@ -51,6 +51,11 @@ void initPlayerData() {
|
|||
|
||||
buffered_chunks = bufferSize/CHUNK_SIZE;
|
||||
|
||||
if(buffered_chunks >= 1<<15) {
|
||||
ERROR("buffer size \"%i\" is too big\n",bufferSize);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
perc = strtod((getConf())[CONF_BUFFER_BEFORE_PLAY],&test);
|
||||
if(*test!='%' || perc<0 || perc>100) {
|
||||
ERROR("buffered before play \"%s\" is not a positive "
|
||||
|
|
|
@ -37,10 +37,10 @@ typedef struct _Buffer {
|
|||
mpd_uint16 * chunkSize;
|
||||
mpd_uint16 * bitRate;
|
||||
float * times;
|
||||
int begin;
|
||||
int end;
|
||||
int next;
|
||||
int wrap;
|
||||
mpd_sint16 begin;
|
||||
mpd_sint16 end;
|
||||
mpd_sint16 next;
|
||||
mpd_sint8 wrap;
|
||||
float totalTime;
|
||||
} Buffer;
|
||||
|
||||
|
|
Loading…
Reference in New Issue