<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dolphin/Source/Core/AudioCommon/AlsaSoundStream.cpp, branch 5.0</title>
<subtitle>GameCube and Wii emulator</subtitle>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/'/>
<entry>
<title>ALSA: Don't block on Clear() call.</title>
<updated>2015-10-03T03:31:55+00:00</updated>
<author>
<name>Scott Mansell</name>
<email>phiren@gmail.com</email>
</author>
<published>2015-09-29T11:51:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=a10a3ecbaccbbbdc31be5898cbc9a88ab2d8b872'/>
<id>a10a3ecbaccbbbdc31be5898cbc9a88ab2d8b872</id>
<content type='text'>
snd_pcm_writei() is meant to block block until all samples are written,
but apparently in some situations it can block for much longer, prehaps
even a infinite time, in the case of virtual machine FifoCI runs in.

Because it grabed a mutex before blocking, it could also block the
Clear() call for an infinite length of time, blocking dolphin's emu
thread.

snd_pcm_writei() also takes 10-15 seconds if you run dolphin under GDB
and can randomly take 5 or so seconds during normal usage.

By moving all the pause code to the ALSA thread, Clear() no-longer
blocks and everyone keeps their sanity.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
snd_pcm_writei() is meant to block block until all samples are written,
but apparently in some situations it can block for much longer, prehaps
even a infinite time, in the case of virtual machine FifoCI runs in.

Because it grabed a mutex before blocking, it could also block the
Clear() call for an infinite length of time, blocking dolphin's emu
thread.

snd_pcm_writei() also takes 10-15 seconds if you run dolphin under GDB
and can randomly take 5 or so seconds during normal usage.

By moving all the pause code to the ALSA thread, Clear() no-longer
blocks and everyone keeps their sanity.
</pre>
</div>
</content>
</entry>
<entry>
<title>AlsaSound: fix buffer type, clean up macros</title>
<updated>2015-09-30T11:14:03+00:00</updated>
<author>
<name>booto</name>
<email>remornicus@gmail.com</email>
</author>
<published>2015-09-30T08:41:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=6c28ea58ab4dff49ec203378bef6a2527cf21e44'/>
<id>6c28ea58ab4dff49ec203378bef6a2527cf21e44</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Common: Remove other Common prefixed headers from Common.h</title>
<updated>2015-09-26T22:51:58+00:00</updated>
<author>
<name>Lioncash</name>
<email>mathew1800@gmail.com</email>
</author>
<published>2015-09-26T21:13:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=cc036ca86cdaf709e01221975da734cb64d54a94'/>
<id>cc036ca86cdaf709e01221975da734cb64d54a94</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't busy wait in the audio thread (ALSA)</title>
<updated>2015-08-11T01:54:54+00:00</updated>
<author>
<name>Moncef Mechri</name>
<email>moncef.mechri@gmail.com</email>
</author>
<published>2015-07-07T13:30:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=333f998123f617c6e643103184142d67c090c7fd'/>
<id>333f998123f617c6e643103184142d67c090c7fd</id>
<content type='text'>
When the emulation is paused and the ALSA backend is used, make the audio
thread wait on a condition variable instead of busy-waiting. This commit
fixes bug #7729

Since the ALSA API is not thread-safe, calls to snd_pcm_drop() and snd_pcm_prepare()
in AlsaSound::Clear() are protected by the same mutex as the condition variable in AlsaSound::SoundLoop()
to make sure that we do not call these functions while a call to
snd_pcm_writei() is ongoing.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the emulation is paused and the ALSA backend is used, make the audio
thread wait on a condition variable instead of busy-waiting. This commit
fixes bug #7729

Since the ALSA API is not thread-safe, calls to snd_pcm_drop() and snd_pcm_prepare()
in AlsaSound::Clear() are protected by the same mutex as the condition variable in AlsaSound::SoundLoop()
to make sure that we do not call these functions while a call to
snd_pcm_writei() is ongoing.
</pre>
</div>
</content>
</entry>
<entry>
<title>Initialize ALSA before starting the audio thread</title>
<updated>2015-08-11T01:54:54+00:00</updated>
<author>
<name>Moncef Mechri</name>
<email>moncef.mechri@gmail.com</email>
</author>
<published>2015-08-08T22:37:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=a0c524774386c4543c710958bf1c607a91d6f28c'/>
<id>a0c524774386c4543c710958bf1c607a91d6f28c</id>
<content type='text'>
This fixes a race condition:

Before this commit, there was a race condition when starting a game:

Core::EmuThread(), after having started (but not necessarily completed)
the initialization of the audio thread, calls Core::SetState() which calls
CCPU::EnableStepping(), which in turns calls AudioCommon::ClearAudioBuffer().

This means that SoundStream::Clear() can be called before
AlsaSound::AlsaInit() has completed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes a race condition:

Before this commit, there was a race condition when starting a game:

Core::EmuThread(), after having started (but not necessarily completed)
the initialization of the audio thread, calls Core::SetState() which calls
CCPU::EnableStepping(), which in turns calls AudioCommon::ClearAudioBuffer().

This means that SoundStream::Clear() can be called before
AlsaSound::AlsaInit() has completed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Set copyright year to when a file was created</title>
<updated>2015-05-25T11:22:31+00:00</updated>
<author>
<name>Tillmann Karras</name>
<email>tilkax@gmail.com</email>
</author>
<published>2015-05-24T04:55:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=30ebb2459eb97ba544547183854775df8460b475'/>
<id>30ebb2459eb97ba544547183854775df8460b475</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update license headers to GPLv2+</title>
<updated>2015-05-25T11:22:31+00:00</updated>
<author>
<name>Tillmann Karras</name>
<email>tilkax@gmail.com</email>
</author>
<published>2015-05-17T23:08:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=cefcb0ace9d363b3679b4e93bcc9ec05f1e5f4f8'/>
<id>cefcb0ace9d363b3679b4e93bcc9ec05f1e5f4f8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>SoundStream: Internally construct the mixer</title>
<updated>2015-05-24T09:49:41+00:00</updated>
<author>
<name>Lioncash</name>
<email>mathew1800@gmail.com</email>
</author>
<published>2015-05-24T08:13:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=35ee8a136237042efa6987e954c135f91a065cd0'/>
<id>35ee8a136237042efa6987e954c135f91a065cd0</id>
<content type='text'>
Instead of creating the mixer externally and then passing it in, it can just be made within the class.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of creating the mixer externally and then passing it in, it can just be made within the class.
</pre>
</div>
</content>
</entry>
<entry>
<title>AlsaSoundStream: Use an enum class for signifying ALSA thread state</title>
<updated>2015-05-11T05:56:01+00:00</updated>
<author>
<name>Lioncash</name>
<email>mathew1800@gmail.com</email>
</author>
<published>2015-05-10T06:30:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=f907e5cacee4f0a6c250f0d640eb11d006475f6b'/>
<id>f907e5cacee4f0a6c250f0d640eb11d006475f6b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>AlsaSoundStream: Convert volatile variables to atomics</title>
<updated>2015-05-11T05:55:59+00:00</updated>
<author>
<name>Lioncash</name>
<email>mathew1800@gmail.com</email>
</author>
<published>2015-05-10T04:20:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=353205132c6fa5da8edbe1a4097cef2fad872794'/>
<id>353205132c6fa5da8edbe1a4097cef2fad872794</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
