There was no implementation of setting specific latency value except default case.
An audio type can be set by audio_in[out]_set_sound_stream_info() and therefore
we can utilize the audio type to determine which latency type should be set.
If it is set, the audio core recoginizes it and set this stream with a specific
latency value.
VoIP type is one of the most common usecases for audio-io API. This case is
now added.
[Version] 0.5.15
[Issue Type] Enhancement
Change-Id: Id5fd33f79fbb2430ce35824e06c4454a0f66dff1
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
Name: capi-media-audio-io
Summary: An Audio Input & Audio Output library in Tizen Native API
-Version: 0.5.14
+Version: 0.5.15
Release: 0
Group: Multimedia/API
License: Apache-2.0
/* Init StreamSpec */
AUDIO_IO_LOGD("Set Stream Spec : CPulseStreamSpec::STREAM_LATENCY_INPUT_DEFAULT");
CPulseStreamSpec::EStreamLatency streamSpec = CPulseStreamSpec::EStreamLatency::STREAM_LATENCY_INPUT_DEFAULT;
+ /* Override the default value by audio type */
+ if (audioType == CAudioInfo::EAudioType::AUDIO_IN_TYPE_VOIP)
+ streamSpec = CPulseStreamSpec::EStreamLatency::STREAM_LATENCY_INPUT_VOIP;
+
CPulseStreamSpec spec(streamSpec, mAudioInfo);
internalLock();
streamSpec = CPulseStreamSpec::EStreamLatency::STREAM_LATENCY_OUTPUT_DEFAULT_ASYNC;
}
#endif
+ /* Override the default value by audio type */
+ if (audioType == CAudioInfo::EAudioType::AUDIO_OUT_TYPE_VOIP)
+ streamSpec = CPulseStreamSpec::EStreamLatency::STREAM_LATENCY_OUTPUT_VOIP;
+
CPulseStreamSpec spec(streamSpec, mAudioInfo);
internalLock();