projects
/
vuplus_xbmc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
fb66467
)
[osx/coreaudio] - suppress default output device changed callbacks for 2 seconds...
author
Memphiz
<memphis@machzwo.de>
Wed, 2 Jul 2014 18:06:27 +0000
(20:06 +0200)
committer
Memphiz
<memphis@machzwo.de>
Sun, 20 Jul 2014 15:52:59 +0000
(17:52 +0200)
xbmc/cores/AudioEngine/Sinks/osx/CoreAudioStream.cpp
patch
|
blob
|
history
diff --git
a/xbmc/cores/AudioEngine/Sinks/osx/CoreAudioStream.cpp
b/xbmc/cores/AudioEngine/Sinks/osx/CoreAudioStream.cpp
index
cfa4cbd
..
4064702
100644
(file)
--- a/
xbmc/cores/AudioEngine/Sinks/osx/CoreAudioStream.cpp
+++ b/
xbmc/cores/AudioEngine/Sinks/osx/CoreAudioStream.cpp
@@
-19,6
+19,7
@@
*/
#include "CoreAudioStream.h"
*/
#include "CoreAudioStream.h"
+#include "CoreAudioDevice.h"
#include "CoreAudioHelpers.h"
#include "utils/log.h"
#include "CoreAudioHelpers.h"
#include "utils/log.h"
@@
-212,6
+213,13
@@
bool CCoreAudioStream::SetVirtualFormat(AudioStreamBasicDescription* pDesc)
std::string formatString;
std::string formatString;
+ // suppress callbacks for the default output device change
+ // for the next 2 seconds because setting format
+ // might trigger a change (when setting/unsetting an encoded
+ // passthrough format)
+ CCoreAudioDevice::SuppressDefaultOutputDeviceCB(2000);
+
+
if (!m_OriginalVirtualFormat.mFormatID)
{
// Store the original format (as we found it) so that it can be restored later
if (!m_OriginalVirtualFormat.mFormatID)
{
// Store the original format (as we found it) so that it can be restored later
@@
-292,6
+300,12
@@
bool CCoreAudioStream::SetPhysicalFormat(AudioStreamBasicDescription* pDesc)
std::string formatString;
std::string formatString;
+ // suppress callbacks for the default output device change
+ // for the next 2 seconds because setting format
+ // might trigger a change (when setting/unsetting an encoded
+ // passthrough format)
+ CCoreAudioDevice::SuppressDefaultOutputDeviceCB(2000);
+
if (!m_OriginalPhysicalFormat.mFormatID)
{
// Store the original format (as we found it) so that it can be restored later
if (!m_OriginalPhysicalFormat.mFormatID)
{
// Store the original format (as we found it) so that it can be restored later