Skip to content

Commit 5254764

Browse files
dsward2dsward2
authored andcommitted
Increased kAudioQueueBufferSize, and improved the summary comments at the top of the AudioMonitor.m.
1 parent 6089c3b commit 5254764

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

AudioMonitor/AudioMonitor/AudioMonitor.mm

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
// Copyright © 2017 ArkPhone LLC. All rights reserved.
77
//
88

9-
// Use AudioConverter to resample audio to 48000 Hz, store in ring buffer,
10-
// then provide data to AudioQueue to play with default audio device.
9+
// Receive input LPCM audio data at stdin, store in first TPCircularBuffer
10+
// Use AudioConverter to resample audio to 48000 Hz, store in second TPCircularBuffer, and output to stdout
11+
// then enqueue data to AudioQueue to play with default audio device.
1112

1213
// Apparently, this code violates every rule listed here:
1314
// http://atastypixel.com/blog/four-common-mistakes-in-audio-development/
@@ -27,13 +28,13 @@
2728
#include <stdlib.h>
2829

2930

30-
#define kInputMaxPackets (4 * 1024)
3131
#define kAudioQueueChannelsCount 1
3232
#define kAudioQueueSampleRate 48000
3333

3434
#define kInputPacketLength sizeof(SInt16)
3535

36-
#define kAudioQueueBufferSize (kInputMaxPackets * sizeof(SInt16) * 2)
36+
#define kInputMaxPackets 65536
37+
#define kAudioQueueBufferSize (kInputMaxPackets * sizeof(SInt16))
3738

3839
@interface AudioMonitor ()
3940
@end

0 commit comments

Comments
 (0)