History log of /haiku/src/kits/game/GameSoundBuffer.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>


# 2e68fbd2 11-Dec-2020 Máximo Castañeda <antiswen@yahoo.es>

Fix wrap for AUDIO_INT

Floats don't have enough precision for all 32 bit integers. In
particular, near INT32_MAX their value is INT32_MAX + 1, which, when
converted back to int becomes INT32_MIN.

Change-Id: Ief3c1177b4f69baac13df5bac977882fea95ae01
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3511
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 65b3fe45 08-Dec-2020 Jérôme Duval <jerome.duval@gmail.com>

GameKit: give up default template parameter for gcc2


# 6336b86a 08-Dec-2020 Jérôme Duval <jerome.duval@gmail.com>

GameKit: gcc2 build fix


# fb6ee784 07-Dec-2020 Máximo Castañeda <antiswen@yahoo.es>

GameSoundBuffer: avoid buffer copy

Change-Id: Ibffe80ebe5e8205e853e09b6ebb9ba65b53d83e7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3475
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# cfe72209 27-Nov-2020 Máximo Castañeda <antiswen@yahoo.es>

U8 sound format

U8 sound has a nonzero value as its zero amplitude, so it needs to be
special-cased when mixing, applying gains and other transformations.

Change-Id: I5ad96b5f39d454bffad2449ac9f27b2ae61e2ccd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3470
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 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.


# 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


# 1345706a 14-Aug-2010 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fix typo (CID 392)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38104 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


# 671fe092 22-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added missing break(s) in switch block in GameSoundBuffer::GetAttributes(). Added missing default case. Avoid double calculation of buffer size

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


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

Style changes. don't use new to allocate a 2-sized buffer, but use the stack

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


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

CID 80. err was checked twice for the same value. Also add more error checks

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


# b56c51bc 15-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

set fPanRamp and fGainRamp to NULL after deleting them, otherwise they could be double-freed. Also dont' check for NULL before calling delete. CID 1230 and 1231

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


# 746cac05 12-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

fixed buffer overrun, CID 649

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27446 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


# 338b8dc3 29-Oct-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged changes from branch build_system_redesign at revision 14573.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 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.


# 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


# 1345706a9ff6ad0dc041339a02d4259998b0765d 14-Aug-2010 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fix typo (CID 392)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38104 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


# 671fe092d31a47b312da238ebdf1a4defca0c655 22-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added missing break(s) in switch block in GameSoundBuffer::GetAttributes(). Added missing default case. Avoid double calculation of buffer size

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


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

Style changes. don't use new to allocate a 2-sized buffer, but use the stack

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


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

CID 80. err was checked twice for the same value. Also add more error checks

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


# b56c51bcba209384fb536026f5120da08f556c3d 15-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

set fPanRamp and fGainRamp to NULL after deleting them, otherwise they could be double-freed. Also dont' check for NULL before calling delete. CID 1230 and 1231

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


# 746cac055adc6ac3308c7bc2d29040fb95689cc9 12-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

fixed buffer overrun, CID 649

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27446 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


# 338b8dc301721b1f472e8297a898d4eaa2f2ee3a 29-Oct-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged changes from branch build_system_redesign at revision 14573.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 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