Commit Graph
100 Commits
Author SHA1 Message Date
Glenn Maynard fa33890a78 fix RageSoundReader_Silence END_OF_FILE 2006-12-21 23:41:02 +00:00
Glenn Maynard d2db2ffd5c don't SetParams constantly 2006-12-21 07:16:56 +00:00
Glenn Maynard d2b8ac925a comment 2006-12-21 05:37:09 +00:00
Glenn Maynard 1b60b0a86d fix up seeking 2006-12-21 05:26:24 +00:00
Glenn Maynard 8f67314017 merge tests; check SetPosition(0) return value 2006-12-21 05:15:33 +00:00
Glenn Maynard 6176e8dab3 api update 2006-12-21 05:08:12 +00:00
Glenn Maynard aa4be6dffb Return 1 from SetPosition(n) on success, 0 on seek past EOF, not
"the position seeked to".  This fixes a special case: SetPosition(n)
returning 0 was EOF except when SetPosition(0).  The returned value
on success was always n, anyway; we never seek to a different position
and return success.
2006-12-21 05:07:49 +00:00
Glenn Maynard ea7e48e08e move secure random code 2006-12-20 23:17:57 +00:00
Glenn Maynard b8cb44c0be remove unused 2006-12-20 23:08:45 +00:00
Glenn Maynard db819c196e build update 2006-12-20 21:55:32 +00:00
Glenn Maynard b61de509a4 don't use crypt directly 2006-12-20 12:00:17 +00:00
Glenn Maynard 9ce5ed8f88 fixup path lookup 2006-12-20 03:44:58 +00:00
Glenn Maynard c3cf5ef59e remove ProcessMessages 2006-12-20 01:11:49 +00:00
Glenn Maynard eb65a1bec2 increase LUA_IDSIZE 2006-12-20 00:18:36 +00:00
Glenn Maynard 9fa41a8aef fix conversion 2006-12-19 23:55:42 +00:00
Glenn Maynard 651bc15c55 cleanup 2006-12-19 09:43:05 +00:00
Glenn Maynard 73ebb69687 get_write_pointer helper 2006-12-19 09:42:45 +00:00
Glenn Maynard 0340f75745 don't count credits added on the system menu in bookkeeping 2006-12-19 09:09:16 +00:00
Glenn Maynard b29f884b95 remove old param 2006-12-19 09:05:27 +00:00
Glenn Maynard fd42989229 slightly odd, but practical: handle coin counter in LightsMan 2006-12-19 09:02:40 +00:00
Glenn Maynard 435ec1818a remove EnterTimeCriticalSection/ExitTimeCriticalSection 2006-12-19 08:03:42 +00:00
Glenn Maynard 1786d99735 GetPositionSeconds(&tm) returns the clock time timestamp associated with the
returned sound time.  This is tricky: we may be interrupted, causing timing error.

We tried working around this by trying to hint the scheduler that we're in a
period where we don't want to be interrupted, even though we're in a thread
that's not normally high priority, by boosting the priority temporarily.  This
worked in Windows, but not in general; it's too far out of the expectations of
schedulers and generally just made things worse.

Let's look at this like an interruption-based lockless algorithm: try it, see
if it succeeded, and if it failed, try again.

Retrying even once should be a rare exception, but failsafe anyway, so a bug
in a sound driver won't hang.
2006-12-19 08:00:45 +00:00
Glenn Maynard da93ccefeb fixup 2006-12-19 02:53:42 +00:00
Glenn Maynard 70569f1b82 I don't like the song-dependent courses in the trunk. It causes "song
not found" warnings for most people.  The core shouldn't "depend"
on particular songs.  Distribute courses with songs, or separately, but
let's not depend on them here.
2006-12-19 02:52:00 +00:00
Glenn Maynard 550e91daff use WrapInActorFrame 2006-12-19 02:03:09 +00:00
Glenn Maynard f375632588 WrapInActorFrame helper 2006-12-19 02:01:52 +00:00
Glenn Maynard a8a945352c update LoadActor
don't load the def repeatedly
2006-12-19 01:55:49 +00:00
Glenn Maynard aac2933b54 missed 2006-12-19 01:46:49 +00:00
Glenn Maynard 21de36d26a fix warning 2006-12-19 01:42:26 +00:00
Glenn Maynard f0c8b94b21 _WINDOWS -> WINDOWS 2006-12-19 01:03:44 +00:00
Glenn Maynard acf261151e LightsDriver_Null 2006-12-18 22:35:27 +00:00
Glenn Maynard 1160ced051 remove LightsDriver_Null 2006-12-18 22:33:20 +00:00
Glenn Maynard d2e52b64b0 SystemMessage,Export by default 2006-12-18 22:32:46 +00:00
Glenn Maynard 6368cd4a3d load SystemMessage explicitly 2006-12-18 22:30:19 +00:00
Glenn Maynard b76c28c5cd registered lights drivers 2006-12-18 22:29:49 +00:00
Glenn Maynard ef9bf1835e merge/simplify 2006-12-18 22:06:23 +00:00
Glenn Maynard 276de65c4d merge more dupe code 2006-12-18 22:03:48 +00:00
Glenn Maynard d7da6c5a26 revert unintended 2006-12-18 21:36:05 +00:00
Glenn Maynard 05edb8687f remove arch.h 2006-12-17 08:14:05 +00:00
Glenn Maynard b984831d4d SUPPORT_OPENGL by default. (The general guideline for arch_setup
is "provide reasonable behavior by default"; arch_setup should set up
things special for that architecture, with a minimum of boilerplate.)
2006-12-17 08:13:42 +00:00
Glenn Maynard a612f19a40 specify graphics drivers
(This isn't the best place for this, but RageDisplay drivers probably aren't
destined for arch.)
2006-12-17 08:10:22 +00:00
Glenn Maynard 7e327ef5b8 unused 2006-12-17 08:04:26 +00:00
Glenn Maynard da708702ca Theora fixup 2006-12-17 08:02:19 +00:00
Glenn Maynard f2e0053c7d Make* -> Driver::Create. Having these floating in arch.h isn't
useful; if you create the class, you need the class definition to
free it, and anyone creating a class is probably going to use it,
too.
2006-12-17 08:00:03 +00:00
Glenn Maynard 9b531743fc InputHandler::Create 2006-12-17 07:56:18 +00:00
Glenn Maynard 3124b25ad0 make MovieTexture act more like other drivers: MovieTexture itself
is a factory for RageTexture objects, not a RageTexture itself.  The
actual RageTexture objects don't need to be exposed in the headers
(DShow still does it for DShow_Helpers), so we don't need to expose
the headers of the movie API to user code.  (We could also eliminate
reconstructing the factory driver each time we make a movie, but
there's no real reason to currently.)
2006-12-17 07:54:34 +00:00
Glenn Maynard a42e1bcbfb InputHandler::Create 2006-12-17 07:42:02 +00:00
Glenn Maynard 17c32b90c2 Make* -> Driver::Create. Having these floating in arch.h isn't
useful; if you create the class, you need the class definition to
free it, and anyone creating a class is probably going to use it,
too.
2006-12-17 07:41:21 +00:00
Glenn Maynard 50ca6633cb cleanup 2006-12-17 07:33:09 +00:00
Glenn Maynard fc6033d754 cleanup 2006-12-17 07:16:06 +00:00
Glenn Maynard a8dc57f38e merge duplicate boilerplate code 2006-12-17 07:15:25 +00:00
Glenn Maynard 274b8acfae update 2006-12-17 07:10:07 +00:00
Glenn Maynard 2b9a167455 add RageDriver to merge duplicate boilerplate code 2006-12-17 07:06:53 +00:00
Glenn Maynard 519e61ee48 style cleanup 2006-12-17 07:04:43 +00:00
Glenn Maynard d4f43cf844 reduce boilerplate code 2006-12-17 07:00:30 +00:00
Glenn Maynard f55345ad84 update 2006-12-17 06:56:31 +00:00
Glenn Maynard 9447322729 CreateClass helper 2006-12-17 06:53:52 +00:00
Glenn Maynard 4bd423fa10 remove monolithic arch.cpp 2006-12-17 06:49:52 +00:00
Glenn Maynard bcec908ebf split out MakeMemoryCardDriver 2006-12-17 06:49:25 +00:00
Glenn Maynard ad698b2c26 split out MakeLoadingWindow 2006-12-17 06:47:57 +00:00
Glenn Maynard c7f82f0529 split out MakeLowLevelWindow, MakeLightsDrivers 2006-12-17 06:46:02 +00:00
Glenn Maynard 5255fa036c fixup 2006-12-17 06:45:49 +00:00
Glenn Maynard 21be9b5cf1 split out MakeLightsDrivers 2006-12-17 06:45:06 +00:00
Glenn Maynard 3461ab8c4e split out MakeLowLevelWindow 2006-12-17 06:42:47 +00:00
Glenn Maynard 799f20d8d1 unreachable (we check for this outside), and we can return NULL anyway, if all drivers fail 2006-12-17 06:17:56 +00:00
Glenn Maynard fb968d435d uhh 2006-12-17 06:15:13 +00:00
Glenn Maynard e63698aa43 add LightsDriver_Export 2006-12-17 03:18:26 +00:00
Glenn Maynard 91bee90f1c remove unused 2006-12-16 23:00:31 +00:00
Glenn Maynard 59b35c19bb simplify stream configuration 2006-12-16 22:45:44 +00:00
Glenn Maynard 3f3e6cd480 fix init order warning 2006-12-16 22:12:20 +00:00
Glenn Maynard 45ee492808 LoadActor(path)(args) -> LoadActor(path, args) 2006-12-15 23:04:47 +00:00
Glenn Maynard 1cf89233a8 rename LoadActor to LoadActorFunc
allow level param to LoadActorFunc
LoadActor now evaluates the function; arguments can be passed
directly to LoadActor; use LoadActorFunc if you want to get the
factory directly
2006-12-15 23:03:47 +00:00
Glenn Maynard b700578675 remove unused param 2006-12-15 21:23:37 +00:00
Glenn Maynard ebd0ca28b5 implement swap, operator=, block sizes 2006-12-14 19:37:57 +00:00
Glenn Maynard 622d6b433b default buffer size of 512 2006-12-14 10:57:37 +00:00
Glenn Maynard a348425d23 fix RageSoundReader_Pan::Read logic 2006-12-14 02:32:33 +00:00
Glenn Maynard 4418f202f4 update comment 2006-12-13 22:30:35 +00:00
Glenn Maynard 5bfc731036 remove old GetPCM 2006-12-13 18:40:02 +00:00
Glenn Maynard 7fecf43f1d update comment 2006-12-13 18:38:07 +00:00
Glenn Maynard 95f72debdc remove pSound param 2006-12-13 09:17:48 +00:00
Glenn Maynard 2377925f41 remove iRate param 2006-12-13 09:15:29 +00:00
Glenn Maynard 0f76adec67 GetSampleRate(int) -> GetSampleRate(); one sample rate
per driver
2006-12-13 09:13:41 +00:00
Glenn Maynard f75a281c18 GetPosition(pSound) -> GetPosition(); one hardware sound position
per driver
2006-12-13 09:10:08 +00:00
Glenn Maynard fb9639f52c remove RageSoundDriver_DSound (complicated hardware mixer) 2006-12-13 08:58:40 +00:00
Glenn Maynard fae5e9fafa remove RageSoundDriver_ALSA9 (complicated hardware mixer) 2006-12-13 08:56:56 +00:00
Glenn Maynard 873a979b06 make GetSource virtual 2006-12-13 08:47:05 +00:00
Glenn Maynard 893e9d9e53 units are samples, not bytes 2006-12-12 02:47:35 +00:00
Glenn Maynard f33bb09334 use default 2006-12-11 05:59:27 +00:00
Glenn Maynard a62b963fb8 make GetNumChannels pure virtual
not 1 or 2 anymore; RageSound only supports 1 or 2 but intermediate
filters may have more
2006-12-10 09:04:58 +00:00
Glenn Maynard ef5c5e20c1 SetPosition 2006-12-10 09:01:05 +00:00
Glenn Maynard 7385c1f4c1 merge SetPosition_Accurate and SetPosition_Fast. Use a property
instead.
2006-12-10 08:59:13 +00:00
Glenn Maynard 87cba64986 ratio fixup 2006-12-10 07:34:35 +00:00
Glenn Maynard 7d0754c2a6 update 2006-12-10 07:20:13 +00:00
Glenn Maynard ecbbe89f1a Read() update 2006-12-10 07:17:58 +00:00
Glenn Maynard 5ad35cc6c6 add a failsafe; this runs in a high-priority thread 2006-12-10 07:12:20 +00:00
Glenn Maynard 0b529a4960 RageSoundReader::Read() returns sound data which may be at a
different rate than the source it's reading from; one second
of returned data may correspond to two seconds in the source
material.

GetStreamToSourceRatio returns the ratio of returned data in
the next Read() call to source data.  This is propagated
upwards in the filter tree, so rate changes by a speed changer
in the middle of the tree will be reflected in the final
GetStreamToSourceRatio().

This means that whenever the ratio changes, Read() stops
returning data; it returns whatever it has, so the caller
has an opportunity to call GetStreamToSourceRatio again
and notice the change.

These semantics can be annoying to implement in some
cases, where only the processing of Read() may notice
a ratio change.  Read() may want to return 0, to say
"something changed, call GetStreamToSourceRatio again",
but 0 means EOF.

Add RageSoundReader::END_OF_FILE.  0 is now no
longer a special case; it means "there's more data, I
just didn't return any this time".  This is functionally
equivalent to errno EINTR.
2006-12-10 07:08:17 +00:00
Glenn Maynard 2f1782d892 merge Read and ReadBlock 2006-12-10 05:41:41 +00:00
Glenn Maynard 04b2933af6 simplify and correct. If Read (and ReadBlock) doesn't return as much data as requested, it may be because the rate is changing. 2006-12-10 05:32:03 +00:00
Glenn Maynard 9a55b8d28a remove unused 2006-12-10 05:18:33 +00:00
Glenn Maynard da55d82dec unused decl 2006-12-10 04:51:18 +00:00