Commit Graph

140 Commits

Author SHA1 Message Date
Augustin Cavalier
44d19f4d32 GameSoundDevice: Don't use operator= on BLocker. 2016-05-13 23:16:40 -04:00
Dario Casalinuovo
6d2f2ec177 Rework nodes to call Run() only after registration
* While it should not be a big problem the
  bebook specify to do it after custom operations,
  most nodes also follow this way, this commit restore
  consistency.
2015-07-24 20:09:15 +02:00
Adrien Destugues
042bb68ed6 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.
2014-12-11 17:17:55 +01:00
Adrien Destugues
bf57c148f7 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.
2014-12-11 16:02:59 +01:00
Oliver Tappe
220d040227 Use libstdc++, libsupc++ and libgcc from gcc_syslibs.
* Instead of faking libstdc++.so from libstdc++.a, use libstdc++.so
  from the gcc_syslibs build feature for everything except x86_gcc2.
* Use libgcc_s.so from the gcc_syslibs build feature for everything but
  x86_gcc2 (which still carries libgcc as part of libroot.so).
* Drop filtering of libgcc objects for libroot, as that is no longer
  necessary since we're only using libgcc-as-single-object for libroot
  with x86_gcc2, where the filtered object file doesn't exist. Should
  the objects that used to be filtered cause any problems as part of
  libgcc_s.so, we can always filter them as part of the gcc build.
* Use libsupc++.so from the gcc_syslibs build feature for everything but
  x86_gcc2.
* Adjust all Jamfiles accordingly.
* Deactivate building of faked libstdc++.so for non-x86-gcc2. For
  x86_gcc2, we still build libstdc++.so from the sources in the Haiku
  source tree as part of the Haiku build .
* Put gcc_syslibs package onto the image, when needed.
2014-08-13 13:32:44 +02:00
John Scipione
37fedaf849 Style fixes to the Game Kit, focus on docs 2014-06-11 16:44:48 -04:00
Ingo Weinhold
225b638263 Support building most system libraries for secondary arch
Also adjust the HaikuImageGet[Private]SystemLibs rules to support to
return the library targets matching the current architecture.
2013-08-06 00:45:22 +02:00
Sergei Reznikov
7f4d1af49d Compilation fixes for x86_64.
Added quite a few missing components to image:

alert arp bc CortexAddOnHost

CDPlayer CharacterMap DeskCalc
Devices DiskUsage Expander LaunchBox MediaConverter NetworkStatus
PoorMan Pulse Screenshot ShowImage SoundRecorder TV Workspaces

DataTranslations Media Printers ScreenSaver

BSnow Cortex FontDemo OverlayImage Pairs

cddb_daemon midi_server power_daemon print_server print_addon_server

Canon LIPS3 Compatible Canon LIPS4 Compatible Gutenprint
PCL5 Compatible PCL6 Compatible PDF Writer PS Compatible

libgame.so libmedia.so

Signed-off-by: Alex Smith <alex@alex-smith.me.uk>
2013-01-04 18:45:22 +00:00
John Scipione
ff3409e005 Return EALREADY if already in requested playback mode.
That's what the BeBook says the method is suppose to do.
2012-12-24 15:27:41 -05:00
Julian Harnath
49d7857e32 Fix BDirectWindow::GetClippingRect
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2012-11-18 16:38:03 +01:00
Adrien Destugues - PulkoMandy
93e30a47be Add a simpler test for BPushGameSound and attempt to fix the most striking mistakes in there. 2012-08-15 10:32:06 +02:00
Alexander von Gluck IV
2c3ab1bed6 kits: Fix a few missed spelling issues 2012-02-08 18:06:03 -06:00
Alexander von Gluck IV
2066acfbc5 game kit: Style and whitespace cleanup. No functional change. 2012-02-08 17:38:59 -06:00
Alexander von Gluck IV
1b6bc2675f kits: Some spelling cleanup of common mistyped words
* Little whitespace cleanup
* No functional change
2012-02-08 16:50:18 -06:00
Adrien Destugues
0cc215800b 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
2011-11-02 20:05:31 +00:00
Adrien Destugues
d3fdcc312a 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
2011-11-02 19:44:46 +00:00
Adrien Destugues
0044a8c39a Apply patch by bkmx from ticket #5093 : fixes some buffer index math in
BPushGameSound so at least it doesn't crashes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43064 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-11-01 14:31:08 +00:00
Marcus Overhagen
6cb28af8fd Remove unsave usage of strncpy.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42455 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-07-19 20:54:21 +00:00
Marcus Overhagen
c80809a3ab This should fix crashes due to bad initialization. Completely untested. Might help with ticket #3241
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42453 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-07-19 18:14:29 +00:00
Stefano Ceccherini
1345706a9f Fix typo (CID 392)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38104 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-14 21:25:16 +00:00
Axel Dörfler
b289aaf66b * A BBuffer does not know where it came from, so
BBufferConsumer::BufferReceived() cannot know whom to send the "buffer is
  late" notification (unless we only have a single input). To solve this, the
  media_header now contains extra fields that can be used to create a
  media_source object.
* Unfortunately, BBufferProducer::SendBuffer() cannot know the output either in
  case there is more than one. Hence, I deprecated the existing SendBuffer()
  call and moved it into "private" - IOW old sources using it won't compile
  anymore under Haiku.
* I introduced a new SendBuffer() variant that also gets the media_source as
  argument.
* Updated all sources (that are part of the image) to use the new variant.
* Removed some purposely commented out code in the audio mixer.
* Implemented late buffer notification, as well as late buffer handling in the
  audio mixer; this is a bit of work in progress, so the debug output is left
  in there.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36184 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 13:15:46 +00:00
Stefano Ceccherini
c9ad965c81 removed debug printfs()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33853 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-31 16:55:24 +00:00
Axel Dörfler
9fe35223cf * BWindowScreens had no sychronization mechanism whatsoever - since the
workspace activation message was asynchronous, whether or not the
  BWindowScreen stopped drawing in time was pure luck (this also caused crashes
  with the VESA driver, as that one unmaps its frame buffer during mode switch).
  Introduced a new AS_DIRECT_SCREEN_LOCK protocol for this.
* In the long term, we should let BWindowScreen use the same mechanism as
  BDirectWindows, though.
* Removed superfluous locking in BDirectWindow::_InitData().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32746 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-27 12:10:59 +00:00
Axel Dörfler
2c704682c4 * Reenabled direct window mode, ie. reverted r32693.
* Fixed warnings with DEBUG enabled.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32740 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-27 08:39:48 +00:00
Stefano Ceccherini
fb984c136f Disabled BDirectWindow window mode, for the time being (at least until
we fix it). +alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32693 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 11:08:22 +00:00
Stefano Ceccherini
97cccf16b0 Use some debug output if something fails (since it definitely fails with Chart
and GLTeapot)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32624 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-23 06:55:18 +00:00
Fredrik Modeen
f1a8ae14d2 Some more code styles fixes, thanks axe
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32619 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-22 19:44:45 +00:00
Fredrik Modeen
eb47b26534 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
2009-08-22 13:40:24 +00:00
Axel Dörfler
acc71e7c7c * The feel of a BWindowScreen should actually be kWindowScreenFeel. This makes
the Deskbar behave, and not appear in front of those. However, if auto-raise
  is turned on, the mouse cursor is shown, so it seems to get activated anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32535 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-20 09:02:55 +00:00
Stefano Ceccherini
b4510aa10c Reset the colors before switching the screen mode
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32365 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-14 15:32:45 +00:00
Stefano Ceccherini
08c4703712 Move HideCursor() fom Show() to _Activate(), so it gets called also on workspace change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32300 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-13 10:29:11 +00:00
Stefano Ceccherini
9620428fdf This part wasn't meant to be committed
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32262 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-11 19:02:30 +00:00
Stefano Ceccherini
c7f89a129d Handle workspace changes gracefully, without crashing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32261 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-11 19:00:00 +00:00
Stefano Ceccherini
bfb5eef88f When setting the palette, the passed array is 0 based, even if the first
index is not 0. Bruno, can you check if this fixes SoundPlay's colors?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32241 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-11 04:47:39 +00:00
Stefano Ceccherini
d0c308a5b6 Accidentally enabled tracing
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32148 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-05 21:31:17 +00:00
Stefano Ceccherini
9a95658ce0 Some cleanups. Shouldn't include any functional changes, except maybe
better cleanup on exiting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32147 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-05 21:30:39 +00:00
Oliver Tappe
16d5c24e53 * merged 32bit-wchar_t branches of buildtools and haiku back into
the respective trunk

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31443 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-07 10:30:09 +00:00
Stephan Aßmus
914fb50397 * 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
2009-06-15 15:15:32 +00:00
Stephan Aßmus
3d198cd3ae Do no export unsupported accelerant hooks. Hopefully fixes #3088.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28562 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-08 13:15:02 +00:00
Axel Dörfler
33309cb5fc * BWindowScreen::_InitClone() was broken, it called the "get clone info" method
on uninitialized accelerant, but that's what AS_GET_DRIVER_PATH is for.
* This should fix #2847.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28534 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-06 12:44:26 +00:00
David McPaul
da9b0b46ed split or combine decoder buffers to match mixer buffer size.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28414 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-31 22:34:56 +00:00
David McPaul
45d40b75b9 uint8 Fillbuffer should use sizeof(uint8) for divisor
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28380 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-30 12:00:57 +00:00
David McPaul
d0b2b559f5 match default buffer size to Mixer default
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28379 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-30 11:59:14 +00:00
David McPaul
593356d280 correct spelling error
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28378 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-30 11:57:43 +00:00
Maurice Kalinowski
3feea27945 whitespace and style cleanup, no functional changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28358 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-28 19:54:43 +00:00
Stefano Ceccherini
e7d2f0f0e8 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
2008-09-25 06:12:02 +00:00
Stefano Ceccherini
727834785d 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
2008-09-24 12:55:25 +00:00
Stefano Ceccherini
250505c99b more small style changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27708 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-23 15:38:32 +00:00
Stefano Ceccherini
92ed85c9ec use nothrow for allocation
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27707 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-23 12:41:42 +00:00
Stefano Ceccherini
671fe092d3 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
2008-09-23 12:28:18 +00:00