summaryrefslogtreecommitdiff
path: root/ratox.c
diff options
context:
space:
mode:
authorFRIGN <dev@frign.de>2014-11-01 11:41:21 +0100
committersin <sin@2f30.org>2014-11-01 15:33:06 +0000
commit60ac100f5b88bb3c518bc712e8be7dac1355ae17 (patch)
tree29265e2330db7da2af92f4c47152148c34e4af49 /ratox.c
parent267c56c41afbee3923e5f4127acd436c4eb9c44f (diff)
Don't assume mono-audio in defaults
Diffstat (limited to 'ratox.c')
-rw-r--r--ratox.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ratox.c b/ratox.c
index 55ab40c..3d92523 100644
--- a/ratox.c
+++ b/ratox.c
@@ -1220,7 +1220,8 @@ toxinit(void)
eprintf("Failed to initialize toxav\n");
toxavconfig = av_DefaultSettings;
- framesize = (toxavconfig.audio_sample_rate * toxavconfig.audio_frame_duration / 1000);
+ framesize = (toxavconfig.audio_sample_rate * toxavconfig.audio_frame_duration *
+ toxavconfig.audio_channels) / 1000;
tox_callback_connection_status(tox, cbconnstatus, NULL);
tox_callback_friend_message(tox, cbfriendmessage, NULL);