Skip to content

Commit 95afcf5

Browse files
Merge pull request #25 forward-stream-buff-imprvs into develop
refactor align forward-stream logic with improvements from the original mod_audio_stream
2 parents 69a5b75 + 9c90045 commit 95afcf5

5 files changed

Lines changed: 126 additions & 323 deletions

File tree

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ if(CMAKE_BUILD_TYPE MATCHES "Release")
3434
set_target_properties(ixwebsocket PROPERTIES LINK_FLAGS_RELEASE "-s -w") #-static-libgcc -static-libstdc++
3535
endif()
3636

37-
add_library(mod_openai_audio_stream SHARED mod_openai_audio_stream.c mod_openai_audio_stream.h openai_audio_streamer_glue.h openai_audio_streamer_glue.cpp buffer/ringbuffer.c base64.cpp)
37+
add_library(mod_openai_audio_stream SHARED
38+
mod_openai_audio_stream.c
39+
mod_openai_audio_stream.h
40+
openai_audio_streamer_glue.h
41+
openai_audio_streamer_glue.cpp
42+
base64.cpp
43+
)
3844

3945
set_property(TARGET mod_openai_audio_stream PROPERTY POSITION_INDEPENDENT_CODE ON)
4046

buffer/ringbuffer.c

Lines changed: 0 additions & 123 deletions
This file was deleted.

buffer/ringbuffer.h

Lines changed: 0 additions & 74 deletions
This file was deleted.

mod_openai_audio_stream.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include <switch.h>
55
#include <limits.h>
66
#include <speex/speex_resampler.h>
7-
#include "buffer/ringbuffer.h"
87

98
#define MY_BUG_NAME "audio_stream"
109
#define MAX_SESSION_ID (256)
@@ -33,9 +32,7 @@ struct private_data {
3332
int user_audio_muted:1;
3433
int openai_audio_muted:1;
3534
int close_requested:1;
36-
RingBuffer *buffer;
3735
switch_buffer_t *sbuffer;
38-
uint8_t *data;
3936
int rtp_packets;
4037
switch_buffer_t *playback_buffer;
4138
};

0 commit comments

Comments
 (0)