History log of /haiku/src/kits/game/SimpleGameSound.cpp
Revision Date Author Comments
# 1f0635d2 25-Feb-2019 Murai Takashi <tmurai01@gmail.com>

Game Kit: Fix -Werror=class-memaccess

Replace memset() with media_format.Clear() to fix
-Werror=class-memaccess, pointed by gcc8.

Change-Id: I87a72ac06947e90c468deda6bf6d7bb3b5fb4003
Reviewed-on: https://review.haiku-os.org/c/1113
Reviewed-by: Adrien Destugues <pulkomandy@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.


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

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


# 593356d2 30-Oct-2008 David McPaul <dlmcpaul@gmail.com>

correct spelling error

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


# ea4f253f 14-Apr-2007 Jérôme Duval <korli@users.berlios.de>

update license headers, code style
In BPushGameSound, SetParameter and SetStreamHook return B_UNSUPPORTED while Perform calls the parent class.
Moved code to the constructor.


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


# c7509fce 12-Apr-2007 Jérôme Duval <korli@users.berlios.de>

improve codestyle
fix bad init in BPushGameSound


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


# 0c93c0a8 06-Apr-2007 Jérôme Duval <korli@users.berlios.de>

change the way FileGameSound works : avoid using a port
code style, some clean up


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


# ecc2961b 07-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed warnings and the build.


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


# 65b9e845 25-Oct-2002 beveloper <beveloper@nowhere.fake>

adding the missing Perform() function


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


# 0b4a36ab 10-Aug-2002 beveloper <beveloper@nowhere.fake>

start with libgame.so


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


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

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


# 593356d280e6276bbefd2ff1622c648b0b247afb 30-Oct-2008 David McPaul <dlmcpaul@gmail.com>

correct spelling error

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


# ea4f253fd6982ab9fe71251121e8095b784df7fe 14-Apr-2007 Jérôme Duval <korli@users.berlios.de>

update license headers, code style
In BPushGameSound, SetParameter and SetStreamHook return B_UNSUPPORTED while Perform calls the parent class.
Moved code to the constructor.


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


# c7509fce9db782326f159843f1b028b5f5dcb1d2 12-Apr-2007 Jérôme Duval <korli@users.berlios.de>

improve codestyle
fix bad init in BPushGameSound


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


# 0c93c0a807b27096abbfad677436afb7d1712d4a 06-Apr-2007 Jérôme Duval <korli@users.berlios.de>

change the way FileGameSound works : avoid using a port
code style, some clean up


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


# ecc2961bee0533d1951ce2eab54d2c1e87e87e02 07-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed warnings and the build.


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


# 65b9e84537a5429cec2462329bc5f0f9e520af96 25-Oct-2002 beveloper <beveloper@nowhere.fake>

adding the missing Perform() function


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


# 0b4a36abc99ddad5d0ec9337db3b3d5d2e4b99b0 10-Aug-2002 beveloper <beveloper@nowhere.fake>

start with libgame.so


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