@@ -299,7 +299,10 @@ bool CAESinkAUDIOTRACK::Initialize(AEAudioFormat &format, std::string &device)
299299 else
300300 {
301301 if (CJNIAudioFormat::ENCODING_IEC61937 != -1 )
302+ {
302303 m_encoding = CJNIAudioFormat::ENCODING_IEC61937;
304+ m_sink_sampleRate = 48000 ;
305+ }
303306 else
304307 m_format.m_dataFormat = AE_FMT_S16LE;
305308 }
@@ -323,7 +326,10 @@ bool CAESinkAUDIOTRACK::Initialize(AEAudioFormat &format, std::string &device)
323326 else
324327 {
325328 if (CJNIAudioFormat::ENCODING_IEC61937 != -1 )
329+ {
326330 m_encoding = CJNIAudioFormat::ENCODING_IEC61937;
331+ // m_sink_sampleRate = 48000;
332+ }
327333 else
328334 m_format.m_dataFormat = AE_FMT_S16LE;
329335 }
@@ -337,7 +343,7 @@ bool CAESinkAUDIOTRACK::Initialize(AEAudioFormat &format, std::string &device)
337343 if (CJNIAudioFormat::ENCODING_IEC61937 != -1 )
338344 {
339345 m_encoding = CJNIAudioFormat::ENCODING_IEC61937;
340- m_format. m_channelLayout = AE_CH_LAYOUT_2_0 ;
346+ // m_sink_sampleRate = 48000 ;
341347 }
342348 else
343349 m_format.m_dataFormat = AE_FMT_S16LE;
@@ -392,6 +398,9 @@ bool CAESinkAUDIOTRACK::Initialize(AEAudioFormat &format, std::string &device)
392398 }
393399 else
394400 {
401+ if (m_passthrough && m_format.m_sampleRate > 48000 )
402+ m_buffer_size = std::max ((unsigned int ) 65536 , m_buffer_size);
403+
395404 m_format.m_frameSize = m_format.m_channelLayout .Count () *
396405 (CAEUtil::DataFormatToBits (m_format.m_dataFormat ) / 8 );
397406 if (m_passthrough)
0 commit comments