Skip to content

Commit b00f48e

Browse files
committed
tweak pipewire
1 parent dda081e commit b00f48e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/phazor/phazor.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ int get_audio(int max, float* buff){
10141014

10151015
// Put fade buffer back
10161016
if (mode == PLAYING && fade_fill > 0 && get_buff_fill() < max && fade_lockout == 0){
1017-
1017+
//pthread_mutex_lock(&buffer_mutex);
10181018
int i = 0;
10191019
while (fade_position < fade_fill){
10201020
float cross = fade_position / (float) fade_fill;
@@ -1031,6 +1031,7 @@ int get_audio(int max, float* buff){
10311031
fade_fill = 0;
10321032
fade_position = 0;
10331033
}
1034+
//pthread_mutex_unlock(&buffer_mutex);
10341035
}
10351036

10361037
if (mode == PAUSED || (mode == PLAYING && get_buff_fill() == 0)){
@@ -1151,7 +1152,7 @@ static void on_process(void *userdata) {
11511152

11521153
buf = buffer->buffer;
11531154

1154-
size = get_audio(1000, buf->datas[0].data) * 4;
1155+
size = get_audio(buffer->requested * 2, buf->datas[0].data) * 4;
11551156

11561157
buf->datas[0].chunk->size = size;
11571158
pw_stream_queue_buffer(global_stream, buffer);

0 commit comments

Comments
 (0)