History log of /haiku/src/kits/game/GameSoundDevice.cpp
Revision Date Author Comments
# 2ca13760 20-Aug-2021 Coldfirex <sakison@gmail.com>

Mass updating of OpenBeOS text to Haiku

No functional code altered.

https://dev.haiku-os.org/ticket/17197

Change-Id: I75cc74f6be0ad968fd77c31fbe5b0f650a6fe9e0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4364
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 759ee24c 22-Aug-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

Game Kit: do not allocate BBuffers before initializing the Media Kit

The port pool now being created in BMediaRoster init, we must make sure
the media roster is initialized before doing anything else.

Change-Id: I5a3cc61c993e9be4078772bbf341b637d951d239
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1734
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 44d19f4d 13-May-2016 Augustin Cavalier <waddlesplash@gmail.com>

GameSoundDevice: Don't use operator= on BLocker.


# 042bb68e 11-Dec-2014 Adrien Destugues <pulkomandy@gmail.com>

BGameSound: make Worms Armageddon sounds work

* When the endianness is not intialized, assume B_MEDIA_HOST_ENDIAN.
This is probably what was meant (and this is what Worms Armageddon
means).
* Move creation of the media nodes back to the initialisation instead of
StartPlaying, otherwise an extra node is created each time the sound is
played.


# bf57c148 11-Dec-2014 Adrien Destugues <pulkomandy@gmail.com>

BGameSound: cleanup and several fixes

* Use a template to avoid repeating the panning code for each type
* Rearrange the initialization of BSimpleGameSound so the data is only
copied 0 or 1 times (it was copied 2 or 3 times in some cases) between
the passed buffer and the final one,
* Don't execute the panning code on streams with only 1 channel as this
makes no sense and it will read and write outside the buffers
* Abort early in GameSoundBuffer::Play if fIsPlaying is false.

Fix the crashes in Worms Armageddon. Doesn't fix the sounds being mostly
white noise.


# 2c3ab1be 08-Feb-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

kits: Fix a few missed spelling issues


# 2066acfb 08-Feb-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

game kit: Style and whitespace cleanup. No functional change.


# 1b6bc267 08-Feb-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

kits: Some spelling cleanup of common mistyped words

* Little whitespace cleanup
* No functional change


# 0cc21580 02-Nov-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Patch from bkmx.
Fixes crashes in the game sound code when using small buffers.

Closes #5093, but there are other issues left.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43128 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d3fdcc31 02-Nov-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Use the system mixer instead of trying to instanciate another one in the game kit. This allows to use the game kit class in an hybrid way, and closes #7351.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43127 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f1a8ae14 22-Aug-2009 Fredrik Modeen <fredrik@modeen.se>

Some more code styles fixes, thanks axe

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32619 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eb47b265 22-Aug-2009 Fredrik Modeen <fredrik@modeen.se>

Added Todo from #575 and fixed some code guidelines issues.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32601 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 914fb503 15-Jun-2009 Stephan Aßmus <superstippi@gmx.de>

* Added a couple TODOs after reading a bit in the source.
* Introduced a lock in GetDefaultDevice() and ReleaseDevice() as a quick
solution to the race condition in those functions. It could also use
proper atomic ref counting. Untested.
* Automatic white space cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31060 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e7d2f0f0 25-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

fix the problem reported in the TODO by using a reference to pointer

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27724 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 72783478 23-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added a TODO explaining why BGameSoundDevice::Buffer() is broken. Small style changes

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27720 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3beb2f72 23-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

style changes. Also added a TODO taken from a comment in bug #575

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27705 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fc1ca2da 25-Apr-2008 Jérôme Duval <korli@users.berlios.de>

style cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25177 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6e927a5f 30-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

malloc.h ain't no standard header. Use stdlib.h instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22776 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 14e3d1b5 23-May-2007 Jérôme Duval <korli@users.berlios.de>

don't try to stop a non inited BFileGameSound
now stops BFileGameSound at the end of the track if not looping
GameSoundDevice now checks the sound_id is valid
added a header include in GSUtility.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21221 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2386ff94 04-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added missing include.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3854 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fe5cc7b4 13-Apr-2003 shatty <shatty@nowhere.fake>

add newline to end of file


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3066 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9fc71646 23-Oct-2002 beveloper <beveloper@nowhere.fake>

allow building everything without local(tree external) header files beeing
used for kernel or kit components


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1630 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6eaf1859 21-Oct-2002 beveloper <beveloper@nowhere.fake>

updated by Christopher ML Zumwalt May


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1585 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4703fb5d 06-Oct-2002 beveloper <beveloper@nowhere.fake>

These files have been contributed by Christopher ML Zumwalt May


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1401 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 042bb68ed612cca921a3bc119e56f303f7e11899 11-Dec-2014 Adrien Destugues <pulkomandy@gmail.com>

BGameSound: make Worms Armageddon sounds work

* When the endianness is not intialized, assume B_MEDIA_HOST_ENDIAN.
This is probably what was meant (and this is what Worms Armageddon
means).
* Move creation of the media nodes back to the initialisation instead of
StartPlaying, otherwise an extra node is created each time the sound is
played.


# bf57c148f7787f0df15980976997c6dfb70ee067 11-Dec-2014 Adrien Destugues <pulkomandy@gmail.com>

BGameSound: cleanup and several fixes

* Use a template to avoid repeating the panning code for each type
* Rearrange the initialization of BSimpleGameSound so the data is only
copied 0 or 1 times (it was copied 2 or 3 times in some cases) between
the passed buffer and the final one,
* Don't execute the panning code on streams with only 1 channel as this
makes no sense and it will read and write outside the buffers
* Abort early in GameSoundBuffer::Play if fIsPlaying is false.

Fix the crashes in Worms Armageddon. Doesn't fix the sounds being mostly
white noise.


# 2c3ab1bed617fef9e63fcebd5c4e2dcd123b1db4 08-Feb-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

kits: Fix a few missed spelling issues


# 2066acfbc57260cadff12de083adab718248aec9 08-Feb-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

game kit: Style and whitespace cleanup. No functional change.


# 1b6bc2675fe3691538c8764ab016593f3b06ca53 08-Feb-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

kits: Some spelling cleanup of common mistyped words

* Little whitespace cleanup
* No functional change


# 0cc215800b9e7662154b6c4ad281d42f56124281 02-Nov-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Patch from bkmx.
Fixes crashes in the game sound code when using small buffers.

Closes #5093, but there are other issues left.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43128 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d3fdcc312a9994593e9ab8e1e0bcc93d9aa02389 02-Nov-2011 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Use the system mixer instead of trying to instanciate another one in the game kit. This allows to use the game kit class in an hybrid way, and closes #7351.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43127 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f1a8ae14d2c448db01599ae2f0ce0285f94986f8 22-Aug-2009 Fredrik Modeen <fredrik@modeen.se>

Some more code styles fixes, thanks axe

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32619 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eb47b26534e55948dbb8860916c671f9cf6f37f9 22-Aug-2009 Fredrik Modeen <fredrik@modeen.se>

Added Todo from #575 and fixed some code guidelines issues.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32601 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 914fb50397d4026d0dda216d0d6ee4c6de7089f5 15-Jun-2009 Stephan Aßmus <superstippi@gmx.de>

* Added a couple TODOs after reading a bit in the source.
* Introduced a lock in GetDefaultDevice() and ReleaseDevice() as a quick
solution to the race condition in those functions. It could also use
proper atomic ref counting. Untested.
* Automatic white space cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31060 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e7d2f0f0e8ba899556c14b1d9885b36d3cf7286a 25-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

fix the problem reported in the TODO by using a reference to pointer

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27724 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 727834785d89c8a36d64f23b2b6831025f1ddaa6 23-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added a TODO explaining why BGameSoundDevice::Buffer() is broken. Small style changes

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27720 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3beb2f72d7fc6431606f29d3e4a46ddc9bdd40c0 23-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

style changes. Also added a TODO taken from a comment in bug #575

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27705 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fc1ca2da5cfcb00ffdf791606d5ae97fdd58a638 25-Apr-2008 Jérôme Duval <korli@users.berlios.de>

style cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25177 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6e927a5fc080cb934e7584454f472cacf4c3e361 30-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

malloc.h ain't no standard header. Use stdlib.h instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22776 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 14e3d1b5768e7110b3d5c0855833267409b71dbb 23-May-2007 Jérôme Duval <korli@users.berlios.de>

don't try to stop a non inited BFileGameSound
now stops BFileGameSound at the end of the track if not looping
GameSoundDevice now checks the sound_id is valid
added a header include in GSUtility.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21221 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2386ff94ad624b459a21709aba1a4e3993d7f1db 04-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added missing include.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3854 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fe5cc7b493f8e644abc6be5592a6641a952f04d3 13-Apr-2003 shatty <shatty@nowhere.fake>

add newline to end of file


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3066 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9fc7164698d6f33ed1a1d311078bd7c2f73e6a75 23-Oct-2002 beveloper <beveloper@nowhere.fake>

allow building everything without local(tree external) header files beeing
used for kernel or kit components


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1630 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6eaf18596da6b2fc964d5bf2b818ce599f9b06aa 21-Oct-2002 beveloper <beveloper@nowhere.fake>

updated by Christopher ML Zumwalt May


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1585 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4703fb5d8562169f672b3efe5203f1eb4d9ceb4a 06-Oct-2002 beveloper <beveloper@nowhere.fake>

These files have been contributed by Christopher ML Zumwalt May


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1401 a95241bf-73f2-0310-859d-f6bbb57e9c96