Commit Graph

130 Commits

Author SHA1 Message Date
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
Stefano Ceccherini
3beb2f72d7 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
2008-09-23 11:02:58 +00:00
Stefano Ceccherini
0e79ce1ebc 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
2008-09-23 10:43:02 +00:00
Stefano Ceccherini
2d4df7f2fc 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
2008-09-23 08:33:09 +00:00
Stefano Ceccherini
b56c51bcba 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
2008-09-15 07:17:27 +00:00
Stefano Ceccherini
746cac055a fixed buffer overrun, CID 649
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27446 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 10:10:13 +00:00
Jérôme Duval
fc1ca2da5c style cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25177 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-26 12:16:53 +00:00
Axel Dörfler
cfc3fa87da * Cleaned up InterfaceDefs.h, added TODO about getting rid of declaring
_init_interface_kit_() in there.
* Moved private get_mode_parameter() into the BPrivate namespace.
* Renamed interface_misc.h to InterfacePrivate.h.
* Minor other cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 10:07:35 +00:00
Stefano Ceccherini
28fa064595 Added more conditional debug output, taken from the dw_info test app.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23730 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-25 11:54:35 +00:00
Stefano Ceccherini
020cbad9d4 delete the semaphore instead of releasing it, otherwise
DirectConnected() could be called twice with B_DIRECT_STOP when closing 
the BDirectWindow.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23718 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-24 13:43:34 +00:00
Ingo Weinhold
6e927a5fc0 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
2007-10-30 17:32:27 +00:00