diff options
| author | Gary Scavone <gary@music.mcgill.ca> | 2013-12-27 15:09:26 -0800 |
|---|---|---|
| committer | Gary Scavone <gary@music.mcgill.ca> | 2013-12-27 15:09:26 -0800 |
| commit | 952720f173434ffc5ae0614a834fa5cce7c2a005 (patch) | |
| tree | 079ee0d86a6e3ed946a5a2c4e322af03e1c2c9b3 /RtAudio.cpp | |
| parent | 8276d1721b574a96a6e9e6ba8efbc7d864b7c3e7 (diff) | |
PulseAudio update for input buffer size support.
Diffstat (limited to 'RtAudio.cpp')
| -rw-r--r-- | RtAudio.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/RtAudio.cpp b/RtAudio.cpp index 7e04e98..baaf24e 100644 --- a/RtAudio.cpp +++ b/RtAudio.cpp @@ -6816,9 +6816,15 @@ bool RtApiPulse::probeDeviceOpen( unsigned int device, StreamMode mode, pah = static_cast<PulseAudioHandle *>( stream_.apiHandle );
int error;
+ std::string streamName = "RtAudio";
+ if ( !options->streamName.empty() ) streamName = options->streamName;
switch ( mode ) {
case INPUT:
- pah->s_rec = pa_simple_new( NULL, "RtAudio", PA_STREAM_RECORD, NULL, "Record", &ss, NULL, NULL, &error );
+ pa_buffer_attr buffer_attr;
+ buffer_attr.fragsize = bufferBytes;
+ buffer_attr.maxlength = -1;
+
+ pah->s_rec = pa_simple_new( NULL, streamName.c_str(), PA_STREAM_RECORD, NULL, "Record", &ss, NULL, &buffer_attr, &error );
if ( !pah->s_rec ) {
errorText_ = "RtApiPulse::probeDeviceOpen: error connecting input to PulseAudio server.";
goto error;
|
