Преглед на файлове

obs-filters: Replace circlebuf with deque

derrod преди 1 година
родител
ревизия
8ec91bab04

+ 18 - 18
plugins/obs-filters/async-delay-filter.c

@@ -1,5 +1,5 @@
 #include <obs-module.h>
 #include <obs-module.h>
-#include <util/circlebuf.h>
+#include <util/deque.h>
 #include <util/util_uint64.h>
 #include <util/util_uint64.h>
 
 
 /* NOTE: Delaying audio shouldn't be necessary because the audio subsystem will
 /* NOTE: Delaying audio shouldn't be necessary because the audio subsystem will
@@ -22,11 +22,11 @@ struct async_delay_data {
 	obs_source_t *context;
 	obs_source_t *context;
 
 
 	/* contains struct obs_source_frame* */
 	/* contains struct obs_source_frame* */
-	struct circlebuf video_frames;
+	struct deque video_frames;
 
 
 #ifdef DELAY_AUDIO
 #ifdef DELAY_AUDIO
 	/* stores the audio data */
 	/* stores the audio data */
-	struct circlebuf audio_frames;
+	struct deque audio_frames;
 	struct obs_audio_data audio_output;
 	struct obs_audio_data audio_output;
 #endif
 #endif
 
 
@@ -52,8 +52,8 @@ static void free_video_data(struct async_delay_data *filter,
 	while (filter->video_frames.size) {
 	while (filter->video_frames.size) {
 		struct obs_source_frame *frame;
 		struct obs_source_frame *frame;
 
 
-		circlebuf_pop_front(&filter->video_frames, &frame,
-				    sizeof(struct obs_source_frame *));
+		deque_pop_front(&filter->video_frames, &frame,
+				sizeof(struct obs_source_frame *));
 		obs_source_release_frame(parent, frame);
 		obs_source_release_frame(parent, frame);
 	}
 	}
 }
 }
@@ -71,8 +71,8 @@ static void free_audio_data(struct async_delay_data *filter)
 	while (filter->audio_frames.size) {
 	while (filter->audio_frames.size) {
 		struct obs_audio_data audio;
 		struct obs_audio_data audio;
 
 
-		circlebuf_pop_front(&filter->audio_frames, &audio,
-				    sizeof(struct obs_audio_data));
+		deque_pop_front(&filter->audio_frames, &audio,
+				sizeof(struct obs_audio_data));
 		free_audio_packet(&audio);
 		free_audio_packet(&audio);
 	}
 	}
 }
 }
@@ -114,10 +114,10 @@ static void async_delay_filter_destroy(void *data)
 {
 {
 	struct async_delay_data *filter = data;
 	struct async_delay_data *filter = data;
 
 
-	circlebuf_free(&filter->video_frames);
+	deque_free(&filter->video_frames);
 #ifdef DELAY_AUDIO
 #ifdef DELAY_AUDIO
 	free_audio_packet(&filter->audio_output);
 	free_audio_packet(&filter->audio_output);
-	circlebuf_free(&filter->audio_frames);
+	deque_free(&filter->audio_frames);
 #endif
 #endif
 	bfree(data);
 	bfree(data);
 }
 }
@@ -170,17 +170,17 @@ async_delay_filter_video(void *data, struct obs_source_frame *frame)
 
 
 	filter->last_video_ts = frame->timestamp;
 	filter->last_video_ts = frame->timestamp;
 
 
-	circlebuf_push_back(&filter->video_frames, &frame,
-			    sizeof(struct obs_source_frame *));
-	circlebuf_peek_front(&filter->video_frames, &output,
-			     sizeof(struct obs_source_frame *));
+	deque_push_back(&filter->video_frames, &frame,
+			sizeof(struct obs_source_frame *));
+	deque_peek_front(&filter->video_frames, &output,
+			 sizeof(struct obs_source_frame *));
 
 
 	cur_interval = frame->timestamp - output->timestamp;
 	cur_interval = frame->timestamp - output->timestamp;
 	if (!filter->video_delay_reached && cur_interval < filter->interval)
 	if (!filter->video_delay_reached && cur_interval < filter->interval)
 		return NULL;
 		return NULL;
 
 
-	circlebuf_pop_front(&filter->video_frames, NULL,
-			    sizeof(struct obs_source_frame *));
+	deque_pop_front(&filter->video_frames, NULL,
+			sizeof(struct obs_source_frame *));
 
 
 	if (!filter->video_delay_reached)
 	if (!filter->video_delay_reached)
 		filter->video_delay_reached = true;
 		filter->video_delay_reached = true;
@@ -221,14 +221,14 @@ async_delay_filter_audio(void *data, struct obs_audio_data *audio)
 
 
 	free_audio_packet(&filter->audio_output);
 	free_audio_packet(&filter->audio_output);
 
 
-	circlebuf_push_back(&filter->audio_frames, &cached, sizeof(cached));
-	circlebuf_peek_front(&filter->audio_frames, &cached, sizeof(cached));
+	deque_push_back(&filter->audio_frames, &cached, sizeof(cached));
+	deque_peek_front(&filter->audio_frames, &cached, sizeof(cached));
 
 
 	cur_interval = end_ts - cached.timestamp;
 	cur_interval = end_ts - cached.timestamp;
 	if (!filter->audio_delay_reached && cur_interval < filter->interval)
 	if (!filter->audio_delay_reached && cur_interval < filter->interval)
 		return NULL;
 		return NULL;
 
 
-	circlebuf_pop_front(&filter->audio_frames, NULL, sizeof(cached));
+	deque_pop_front(&filter->audio_frames, NULL, sizeof(cached));
 	memcpy(&filter->audio_output, &cached, sizeof(cached));
 	memcpy(&filter->audio_output, &cached, sizeof(cached));
 
 
 	if (!filter->audio_delay_reached)
 	if (!filter->audio_delay_reached)

+ 13 - 13
plugins/obs-filters/compressor-filter.c

@@ -5,7 +5,7 @@
 #include <obs-module.h>
 #include <obs-module.h>
 #include <media-io/audio-math.h>
 #include <media-io/audio-math.h>
 #include <util/platform.h>
 #include <util/platform.h>
-#include <util/circlebuf.h>
+#include <util/deque.h>
 #include <util/threading.h>
 #include <util/threading.h>
 
 
 /* -------------------------------------------------------- */
 /* -------------------------------------------------------- */
@@ -82,7 +82,7 @@ struct compressor_data {
 	char *sidechain_name;
 	char *sidechain_name;
 
 
 	pthread_mutex_t sidechain_mutex;
 	pthread_mutex_t sidechain_mutex;
-	struct circlebuf sidechain_data[MAX_AUDIO_CHANNELS];
+	struct deque sidechain_data[MAX_AUDIO_CHANNELS];
 	float *sidechain_buf[MAX_AUDIO_CHANNELS];
 	float *sidechain_buf[MAX_AUDIO_CHANNELS];
 	size_t max_sidechain_frames;
 	size_t max_sidechain_frames;
 };
 };
@@ -113,8 +113,8 @@ static inline void get_sidechain_data(struct compressor_data *cd,
 	}
 	}
 
 
 	for (size_t i = 0; i < cd->num_channels; i++)
 	for (size_t i = 0; i < cd->num_channels; i++)
-		circlebuf_pop_front(&cd->sidechain_data[i],
-				    cd->sidechain_buf[i], data_size);
+		deque_pop_front(&cd->sidechain_data[i], cd->sidechain_buf[i],
+				data_size);
 
 
 	pthread_mutex_unlock(&cd->sidechain_mutex);
 	pthread_mutex_unlock(&cd->sidechain_mutex);
 	return;
 	return;
@@ -164,22 +164,22 @@ static void sidechain_capture(void *param, obs_source_t *source,
 
 
 	if (cd->sidechain_data[0].size > expected_size * 2) {
 	if (cd->sidechain_data[0].size > expected_size * 2) {
 		for (size_t i = 0; i < cd->num_channels; i++) {
 		for (size_t i = 0; i < cd->num_channels; i++) {
-			circlebuf_pop_front(&cd->sidechain_data[i], NULL,
-					    expected_size);
+			deque_pop_front(&cd->sidechain_data[i], NULL,
+					expected_size);
 		}
 		}
 	}
 	}
 
 
 	if (muted) {
 	if (muted) {
 		for (size_t i = 0; i < cd->num_channels; i++) {
 		for (size_t i = 0; i < cd->num_channels; i++) {
-			circlebuf_push_back_zero(&cd->sidechain_data[i],
-						 audio_data->frames *
-							 sizeof(float));
+			deque_push_back_zero(&cd->sidechain_data[i],
+					     audio_data->frames *
+						     sizeof(float));
 		}
 		}
 	} else {
 	} else {
 		for (size_t i = 0; i < cd->num_channels; i++) {
 		for (size_t i = 0; i < cd->num_channels; i++) {
-			circlebuf_push_back(&cd->sidechain_data[i],
-					    audio_data->data[i],
-					    audio_data->frames * sizeof(float));
+			deque_push_back(&cd->sidechain_data[i],
+					audio_data->data[i],
+					audio_data->frames * sizeof(float));
 		}
 		}
 	}
 	}
 
 
@@ -299,7 +299,7 @@ static void compressor_destroy(void *data)
 	}
 	}
 
 
 	for (size_t i = 0; i < MAX_AUDIO_CHANNELS; i++) {
 	for (size_t i = 0; i < MAX_AUDIO_CHANNELS; i++) {
-		circlebuf_free(&cd->sidechain_data[i]);
+		deque_free(&cd->sidechain_data[i]);
 		bfree(cd->sidechain_buf[i]);
 		bfree(cd->sidechain_buf[i]);
 	}
 	}
 	pthread_mutex_destroy(&cd->sidechain_mutex);
 	pthread_mutex_destroy(&cd->sidechain_mutex);

+ 1 - 1
plugins/obs-filters/eq-filter.c

@@ -1,5 +1,5 @@
 #include <media-io/audio-math.h>
 #include <media-io/audio-math.h>
-#include <util/circlebuf.h>
+#include <util/deque.h>
 #include <util/darray.h>
 #include <util/darray.h>
 #include <obs-module.h>
 #include <obs-module.h>
 
 

+ 1 - 1
plugins/obs-filters/expander-filter.c

@@ -5,7 +5,7 @@
 #include <obs-module.h>
 #include <obs-module.h>
 #include <media-io/audio-math.h>
 #include <media-io/audio-math.h>
 #include <util/platform.h>
 #include <util/platform.h>
-#include <util/circlebuf.h>
+#include <util/deque.h>
 #include <util/threading.h>
 #include <util/threading.h>
 
 
 /* -------------------------------------------------------- */
 /* -------------------------------------------------------- */

+ 12 - 12
plugins/obs-filters/gpu-delay.c

@@ -1,5 +1,5 @@
 #include <obs-module.h>
 #include <obs-module.h>
-#include <util/circlebuf.h>
+#include <util/deque.h>
 #include <util/util_uint64.h>
 #include <util/util_uint64.h>
 
 
 #define S_DELAY_MS "delay_ms"
 #define S_DELAY_MS "delay_ms"
@@ -13,7 +13,7 @@ struct frame {
 
 
 struct gpu_delay_filter_data {
 struct gpu_delay_filter_data {
 	obs_source_t *context;
 	obs_source_t *context;
-	struct circlebuf frames;
+	struct deque frames;
 	uint64_t delay_ns;
 	uint64_t delay_ns;
 	uint64_t interval_ns;
 	uint64_t interval_ns;
 	uint32_t cx;
 	uint32_t cx;
@@ -33,14 +33,14 @@ static void free_textures(struct gpu_delay_filter_data *f)
 	obs_enter_graphics();
 	obs_enter_graphics();
 	while (f->frames.size) {
 	while (f->frames.size) {
 		struct frame frame;
 		struct frame frame;
-		circlebuf_pop_front(&f->frames, &frame, sizeof(frame));
+		deque_pop_front(&f->frames, &frame, sizeof(frame));
 		gs_texrender_destroy(frame.render);
 		gs_texrender_destroy(frame.render);
 	}
 	}
-	circlebuf_free(&f->frames);
+	deque_free(&f->frames);
 	obs_leave_graphics();
 	obs_leave_graphics();
 }
 }
 
 
-static size_t num_frames(struct circlebuf *buf)
+static size_t num_frames(struct deque *buf)
 {
 {
 	return buf->size / sizeof(struct frame);
 	return buf->size / sizeof(struct frame);
 }
 }
@@ -61,11 +61,11 @@ static void update_interval(struct gpu_delay_filter_data *f,
 
 
 		obs_enter_graphics();
 		obs_enter_graphics();
 
 
-		circlebuf_upsize(&f->frames, num * sizeof(struct frame));
+		deque_upsize(&f->frames, num * sizeof(struct frame));
 
 
 		for (size_t i = prev_num; i < num; i++) {
 		for (size_t i = prev_num; i < num; i++) {
 			struct frame *frame =
 			struct frame *frame =
-				circlebuf_data(&f->frames, i * sizeof(*frame));
+				deque_data(&f->frames, i * sizeof(*frame));
 			frame->render =
 			frame->render =
 				gs_texrender_create(GS_RGBA, GS_ZS_NONE);
 				gs_texrender_create(GS_RGBA, GS_ZS_NONE);
 		}
 		}
@@ -77,7 +77,7 @@ static void update_interval(struct gpu_delay_filter_data *f,
 
 
 		while (num_frames(&f->frames) > num) {
 		while (num_frames(&f->frames) > num) {
 			struct frame frame;
 			struct frame frame;
-			circlebuf_pop_front(&f->frames, &frame, sizeof(frame));
+			deque_pop_front(&f->frames, &frame, sizeof(frame));
 			gs_texrender_destroy(frame.render);
 			gs_texrender_destroy(frame.render);
 		}
 		}
 
 
@@ -240,7 +240,7 @@ get_tech_name_and_multiplier(enum gs_color_space current_space,
 static void draw_frame(struct gpu_delay_filter_data *f)
 static void draw_frame(struct gpu_delay_filter_data *f)
 {
 {
 	struct frame frame;
 	struct frame frame;
-	circlebuf_peek_front(&f->frames, &frame, sizeof(frame));
+	deque_peek_front(&f->frames, &frame, sizeof(frame));
 
 
 	const enum gs_color_space current_space = gs_get_color_space();
 	const enum gs_color_space current_space = gs_get_color_space();
 	float multiplier;
 	float multiplier;
@@ -283,7 +283,7 @@ static void gpu_delay_filter_render(void *data, gs_effect_t *effect)
 	}
 	}
 
 
 	struct frame frame;
 	struct frame frame;
-	circlebuf_pop_front(&f->frames, &frame, sizeof(frame));
+	deque_pop_front(&f->frames, &frame, sizeof(frame));
 
 
 	const enum gs_color_space preferred_spaces[] = {
 	const enum gs_color_space preferred_spaces[] = {
 		GS_CS_SRGB,
 		GS_CS_SRGB,
@@ -327,7 +327,7 @@ static void gpu_delay_filter_render(void *data, gs_effect_t *effect)
 
 
 	gs_blend_state_pop();
 	gs_blend_state_pop();
 
 
-	circlebuf_push_back(&f->frames, &frame, sizeof(frame));
+	deque_push_back(&f->frames, &frame, sizeof(frame));
 	draw_frame(f);
 	draw_frame(f);
 	f->processed_frame = true;
 	f->processed_frame = true;
 
 
@@ -347,7 +347,7 @@ gpu_delay_filter_get_color_space(void *data, size_t count,
 	}
 	}
 
 
 	struct frame frame;
 	struct frame frame;
-	circlebuf_peek_front(&f->frames, &frame, sizeof(frame));
+	deque_peek_front(&f->frames, &frame, sizeof(frame));
 	enum gs_color_space space = frame.space;
 	enum gs_color_space space = frame.space;
 	for (size_t i = 0; i < count; ++i) {
 	for (size_t i = 0; i < count; ++i) {
 		space = preferred_spaces[i];
 		space = preferred_spaces[i];

+ 32 - 32
plugins/obs-filters/noise-suppress-filter.c

@@ -1,7 +1,7 @@
 #include <stdint.h>
 #include <stdint.h>
 #include <inttypes.h>
 #include <inttypes.h>
 
 
-#include <util/circlebuf.h>
+#include <util/deque.h>
 #include <util/threading.h>
 #include <util/threading.h>
 #include <obs-module.h>
 #include <obs-module.h>
 
 
@@ -88,9 +88,9 @@ struct noise_suppress_data {
 	size_t frames;
 	size_t frames;
 	size_t channels;
 	size_t channels;
 
 
-	struct circlebuf info_buffer;
-	struct circlebuf input_buffers[MAX_PREPROC_CHANNELS];
-	struct circlebuf output_buffers[MAX_PREPROC_CHANNELS];
+	struct deque info_buffer;
+	struct deque input_buffers[MAX_PREPROC_CHANNELS];
+	struct deque output_buffers[MAX_PREPROC_CHANNELS];
 
 
 	bool use_rnnoise;
 	bool use_rnnoise;
 	bool use_nvafx;
 	bool use_nvafx;
@@ -197,8 +197,8 @@ static void noise_suppress_destroy(void *data)
 			}
 			}
 		}
 		}
 #endif
 #endif
-		circlebuf_free(&ng->input_buffers[i]);
-		circlebuf_free(&ng->output_buffers[i]);
+		deque_free(&ng->input_buffers[i]);
+		deque_free(&ng->output_buffers[i]);
 	}
 	}
 
 
 #ifdef LIBSPEEXDSP_ENABLED
 #ifdef LIBSPEEXDSP_ENABLED
@@ -231,7 +231,7 @@ static void noise_suppress_destroy(void *data)
 #endif
 #endif
 
 
 	bfree(ng->copy_buffers[0]);
 	bfree(ng->copy_buffers[0]);
-	circlebuf_free(&ng->info_buffer);
+	deque_free(&ng->info_buffer);
 	da_free(ng->output_data);
 	da_free(ng->output_data);
 	bfree(ng);
 	bfree(ng);
 }
 }
@@ -402,8 +402,8 @@ static inline void alloc_channel(struct noise_suppress_data *ng,
 #ifdef LIBRNNOISE_ENABLED
 #ifdef LIBRNNOISE_ENABLED
 	ng->rnn_states[channel] = rnnoise_create(NULL);
 	ng->rnn_states[channel] = rnnoise_create(NULL);
 #endif
 #endif
-	circlebuf_reserve(&ng->input_buffers[channel], frames * sizeof(float));
-	circlebuf_reserve(&ng->output_buffers[channel], frames * sizeof(float));
+	deque_reserve(&ng->input_buffers[channel], frames * sizeof(float));
+	deque_reserve(&ng->output_buffers[channel], frames * sizeof(float));
 }
 }
 
 
 static inline enum speaker_layout convert_speaker_layout(uint8_t channels)
 static inline enum speaker_layout convert_speaker_layout(uint8_t channels)
@@ -1015,10 +1015,10 @@ static inline void process_nvafx(struct noise_suppress_data *ng)
 
 
 static inline void process(struct noise_suppress_data *ng)
 static inline void process(struct noise_suppress_data *ng)
 {
 {
-	/* Pop from input circlebuf */
+	/* Pop from input deque */
 	for (size_t i = 0; i < ng->channels; i++)
 	for (size_t i = 0; i < ng->channels; i++)
-		circlebuf_pop_front(&ng->input_buffers[i], ng->copy_buffers[i],
-				    ng->frames * sizeof(float));
+		deque_pop_front(&ng->input_buffers[i], ng->copy_buffers[i],
+				ng->frames * sizeof(float));
 
 
 	if (ng->use_rnnoise) {
 	if (ng->use_rnnoise) {
 		process_rnnoise(ng);
 		process_rnnoise(ng);
@@ -1030,10 +1030,10 @@ static inline void process(struct noise_suppress_data *ng)
 		process_speexdsp(ng);
 		process_speexdsp(ng);
 	}
 	}
 
 
-	/* Push to output circlebuf */
+	/* Push to output deque */
 	for (size_t i = 0; i < ng->channels; i++)
 	for (size_t i = 0; i < ng->channels; i++)
-		circlebuf_push_back(&ng->output_buffers[i], ng->copy_buffers[i],
-				    ng->frames * sizeof(float));
+		deque_push_back(&ng->output_buffers[i], ng->copy_buffers[i],
+				ng->frames * sizeof(float));
 }
 }
 
 
 struct ng_audio_info {
 struct ng_audio_info {
@@ -1041,19 +1041,19 @@ struct ng_audio_info {
 	uint64_t timestamp;
 	uint64_t timestamp;
 };
 };
 
 
-static inline void clear_circlebuf(struct circlebuf *buf)
+static inline void clear_deque(struct deque *buf)
 {
 {
-	circlebuf_pop_front(buf, NULL, buf->size);
+	deque_pop_front(buf, NULL, buf->size);
 }
 }
 
 
 static void reset_data(struct noise_suppress_data *ng)
 static void reset_data(struct noise_suppress_data *ng)
 {
 {
 	for (size_t i = 0; i < ng->channels; i++) {
 	for (size_t i = 0; i < ng->channels; i++) {
-		clear_circlebuf(&ng->input_buffers[i]);
-		clear_circlebuf(&ng->output_buffers[i]);
+		clear_deque(&ng->input_buffers[i]);
+		clear_deque(&ng->output_buffers[i]);
 	}
 	}
 
 
-	clear_circlebuf(&ng->info_buffer);
+	clear_deque(&ng->info_buffer);
 }
 }
 
 
 static struct obs_audio_data *
 static struct obs_audio_data *
@@ -1091,44 +1091,44 @@ noise_suppress_filter_audio(void *data, struct obs_audio_data *audio)
 	ng->last_timestamp = audio->timestamp;
 	ng->last_timestamp = audio->timestamp;
 
 
 	/* -----------------------------------------------
 	/* -----------------------------------------------
-	 * push audio packet info (timestamp/frame count) to info circlebuf */
+	 * push audio packet info (timestamp/frame count) to info deque */
 	info.frames = audio->frames;
 	info.frames = audio->frames;
 	info.timestamp = audio->timestamp;
 	info.timestamp = audio->timestamp;
-	circlebuf_push_back(&ng->info_buffer, &info, sizeof(info));
+	deque_push_back(&ng->info_buffer, &info, sizeof(info));
 
 
 	/* -----------------------------------------------
 	/* -----------------------------------------------
-	 * push back current audio data to input circlebuf */
+	 * push back current audio data to input deque */
 	for (size_t i = 0; i < ng->channels; i++)
 	for (size_t i = 0; i < ng->channels; i++)
-		circlebuf_push_back(&ng->input_buffers[i], audio->data[i],
-				    audio->frames * sizeof(float));
+		deque_push_back(&ng->input_buffers[i], audio->data[i],
+				audio->frames * sizeof(float));
 
 
 	/* -----------------------------------------------
 	/* -----------------------------------------------
-	 * pop/process each 10ms segments, push back to output circlebuf */
+	 * pop/process each 10ms segments, push back to output deque */
 	while (ng->input_buffers[0].size >= segment_size)
 	while (ng->input_buffers[0].size >= segment_size)
 		process(ng);
 		process(ng);
 
 
 	/* -----------------------------------------------
 	/* -----------------------------------------------
-	 * peek front of info circlebuf, check to see if we have enough to
+	 * peek front of info deque, check to see if we have enough to
 	 * pop the expected packet size, if not, return null */
 	 * pop the expected packet size, if not, return null */
 	memset(&info, 0, sizeof(info));
 	memset(&info, 0, sizeof(info));
-	circlebuf_peek_front(&ng->info_buffer, &info, sizeof(info));
+	deque_peek_front(&ng->info_buffer, &info, sizeof(info));
 	out_size = info.frames * sizeof(float);
 	out_size = info.frames * sizeof(float);
 
 
 	if (ng->output_buffers[0].size < out_size)
 	if (ng->output_buffers[0].size < out_size)
 		return NULL;
 		return NULL;
 
 
 	/* -----------------------------------------------
 	/* -----------------------------------------------
-	 * if there's enough audio data buffered in the output circlebuf,
+	 * if there's enough audio data buffered in the output deque,
 	 * pop and return a packet */
 	 * pop and return a packet */
-	circlebuf_pop_front(&ng->info_buffer, NULL, sizeof(info));
+	deque_pop_front(&ng->info_buffer, NULL, sizeof(info));
 	da_resize(ng->output_data, out_size * ng->channels);
 	da_resize(ng->output_data, out_size * ng->channels);
 
 
 	for (size_t i = 0; i < ng->channels; i++) {
 	for (size_t i = 0; i < ng->channels; i++) {
 		ng->output_audio.data[i] =
 		ng->output_audio.data[i] =
 			(uint8_t *)&ng->output_data.array[i * out_size];
 			(uint8_t *)&ng->output_data.array[i * out_size];
 
 
-		circlebuf_pop_front(&ng->output_buffers[i],
-				    ng->output_audio.data[i], out_size);
+		deque_pop_front(&ng->output_buffers[i],
+				ng->output_audio.data[i], out_size);
 	}
 	}
 
 
 	ng->output_audio.frames = info.frames;
 	ng->output_audio.frames = info.frames;