summaryrefslogtreecommitdiff
path: root/src/rmd_encode_audio_buffer.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2020-10-08 01:29:12 -0700
committerVito Caputo <vcaputo@pengaru.com>2020-10-08 01:29:12 -0700
commita031634bd64c7f30c4ace5ca06a5a47600b42f47 (patch)
tree919e13ed1ba2e6443fe952288085576322748405 /src/rmd_encode_audio_buffer.c
parentbd53002a2bf51d48992613601719d180fed09975 (diff)
*: more cosmetic formatting cleanups
Making things a bit more consistent
Diffstat (limited to 'src/rmd_encode_audio_buffer.c')
-rw-r--r--src/rmd_encode_audio_buffer.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/rmd_encode_audio_buffer.c b/src/rmd_encode_audio_buffer.c
index 0be0e2f..4e20a1c 100644
--- a/src/rmd_encode_audio_buffer.c
+++ b/src/rmd_encode_audio_buffer.c
@@ -37,7 +37,8 @@
#include <errno.h>
-void *rmdEncodeAudioBuffer(ProgData *pdata) {
+void *rmdEncodeAudioBuffer(ProgData *pdata)
+{
int sampread = pdata->periodsize;
#ifdef HAVE_LIBJACK
void *jackbuf = NULL;
@@ -122,9 +123,8 @@ void *rmdEncodeAudioBuffer(ProgData *pdata) {
vorbis_analysis(&pdata->enc_data->m_vo_block, NULL);
vorbis_bitrate_addblock(&pdata->enc_data->m_vo_block);
- while (vorbis_bitrate_flushpacket(&pdata->enc_data->m_vo_dsp, &pdata->enc_data->m_ogg_pckt2)) {
+ while (vorbis_bitrate_flushpacket(&pdata->enc_data->m_vo_dsp, &pdata->enc_data->m_ogg_pckt2))
ogg_stream_packetin(&pdata->enc_data->m_ogg_vs, &pdata->enc_data->m_ogg_pckt2);
- }
}
pthread_mutex_unlock(&pdata->libogg_mutex);
}
@@ -136,7 +136,8 @@ void *rmdEncodeAudioBuffer(ProgData *pdata) {
pthread_exit(&errno);
}
-void rmdSyncEncodeAudioBuffer(ProgData *pdata, signed char *buff) {
+void rmdSyncEncodeAudioBuffer(ProgData *pdata, signed char *buff)
+{
int sampread = (buff != NULL) ? pdata->periodsize : 0;
float **vorbis_buffer = vorbis_analysis_buffer(&pdata->enc_data->m_vo_dsp, sampread);
© All Rights Reserved