Commit Graph

11 Commits

Author SHA1 Message Date
Glenn Maynard 00f371fa7c remove IsStreamingFromDisk 2006-12-23 07:15:32 +00:00
Glenn Maynard be8c435569 fix RageSoundReader_Split::SetPosition(0) 2006-12-22 08:11:58 +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 7385c1f4c1 merge SetPosition_Accurate and SetPosition_Fast. Use a property
instead.
2006-12-10 08:59:13 +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 ef519723fb fix warning 2006-12-10 04:04:50 +00:00
Glenn Maynard 25e67dd4dc RageSoundReader::Read(buf, unsigned bytes) -> (buf, int frames);
return value in frames, not bytes
2006-12-10 03:56:36 +00:00
Glenn Maynard 7bcb489288 buffering fixes 2006-12-10 03:34:44 +00:00
Glenn Maynard 2b95cdcce9 comment 2006-12-10 01:00:17 +00:00
Glenn Maynard 204d081b09 `RageSoundReader_ChannelSplit 2006-12-09 23:36:53 +00:00