Commit Graph

6 Commits

Author SHA1 Message Date
David Reid 7b65f3748a Add some safety checks to data sources.
With this change, an error is now returned when the requested frame
count is zero. Two reasons for this:

  1) It usually means there's an error in the higher level logic if
     something is trying to read zero frames.

  2) When no frames are read, MA_AT_END should be returned. However, if
     the input frame count is also zero, it creates ambiguity as to
     whether or not the data source is truly at the end.
2021-07-18 10:35:34 +10:00
David Reid 33aae652fe API CHANGE: Update ma_get_standard_channel_map().
This adds a capacity parameter for added safety. It also changes the
order of parameters to make it a bit more consistent.
2021-07-04 19:46:00 +10:00
David Reid 3fad6cad86 API CHANGE: Add channel maps to ma_data_source_get_data_format().
This commit also removes the onGetChannelMap callback from the decoding
backend vtable.
2021-07-04 18:21:36 +10:00
David Reid 1a4742e262 API CHANGE: Remove mapping from data sources.
This has proven to be exceptionally un-useful in practice and the
maintenance cost just isn't worth it.
2021-07-04 16:34:47 +10:00
David Reid 6dbb31849b Fix copy/paste errors. 2021-07-01 10:08:22 +10:00
David Reid 998bd995bc Add libvorbis and libopus data sources to the extras folder. 2021-06-30 20:42:43 +10:00