File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1014,7 +1014,7 @@ int get_audio(int max, float* buff){
1014
1014
1015
1015
// Put fade buffer back
1016
1016
if (mode == PLAYING && fade_fill > 0 && get_buff_fill () < max && fade_lockout == 0 ){
1017
-
1017
+ //pthread_mutex_lock(&buffer_mutex);
1018
1018
int i = 0 ;
1019
1019
while (fade_position < fade_fill ){
1020
1020
float cross = fade_position / (float ) fade_fill ;
@@ -1031,6 +1031,7 @@ int get_audio(int max, float* buff){
1031
1031
fade_fill = 0 ;
1032
1032
fade_position = 0 ;
1033
1033
}
1034
+ //pthread_mutex_unlock(&buffer_mutex);
1034
1035
}
1035
1036
1036
1037
if (mode == PAUSED || (mode == PLAYING && get_buff_fill () == 0 )){
@@ -1151,7 +1152,7 @@ static void on_process(void *userdata) {
1151
1152
1152
1153
buf = buffer -> buffer ;
1153
1154
1154
- size = get_audio (1000 , buf -> datas [0 ].data ) * 4 ;
1155
+ size = get_audio (buffer -> requested * 2 , buf -> datas [0 ].data ) * 4 ;
1155
1156
1156
1157
buf -> datas [0 ].chunk -> size = size ;
1157
1158
pw_stream_queue_buffer (global_stream , buffer );
You can’t perform that action at this time.
0 commit comments