FernetMenta/xbmc — pull request #132 by fritsch (2013-07-06 06:17:46+00:00)
Title: AE: Give Sinks the possibility to be used in a blocking way

This builds back the Sinks to the state where they were before c2493d5bf6bc2be2fb45f563affdd214bf9862fb I am not sure if it is enough for OSS Sink or if we need something additional there like:

```
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp
index ab13671..9d85f0a 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkOSS.cpp
@@ -321,7 +321,8 @@ bool CAESinkOSS::Initialize(AEAudioFormat &format, std::string &device)
return false;
}

- if (fcntl(m_fd, F_SETFL, fcntl(m_fd, F_GETFL, 0) | O_NONBLOCK) == -1)
+ // RAW formats don't play nice with non blocking sinks
+ if (!AE_IS_RAW(format.m_dataFormat) && (fcntl(m_fd, F_SETFL, fcntl(m_fd, F_GETFL, 0) | O_NONBLOCK) == -1))
{
close(m_fd);
CLog::Log(LOGERROR, "CAESinkOSS::Initialize - Failed to set non blocking writes");
```

I pinged @fneufneuf in irc - let's see.

Another point is: I cannot test :-)