forked from roc-streaming/roc-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wip] [api] [cli] roc-streaminggh-608: Formats and sub-formats
API --- TODO CLI --- 1. --io-encoding option now has form <format>@<subformat>/<rate>/<channels> E.g.: pcm@s16/44100/stereo (whether sub-format is allowed or required depends on format) 2. --input-format/--output-format options are removed, their function is now handled by <format> field of --io-encoding E.g.: --output file://- --io-encoding wav@s24/48000/stereo or --input file://- --io-encoding wav/-/- 3. --print-supported is updated to discover and list all available sub-formats (divided into logical groups). Docs ---- TODO Internals --------- Introduce concept of format (e.g. PCM, FLAC) and sub-format (e.g. s16). Support formats and sub-formats in all sndio backends. roc_audio: - SampleFormat => Format - Formats: Format_Pcm, Format_Wav, Format_Custom - PcmFormat => PcmSubformat - SampleSpec: set_format(), set_custom_format(), set_pcm_subformat(), set_custom_subformat() - SampleSpec: is_valid() => is_complete() - Sample_RawFormat => PcmSubformat_Raw roc_sndio: - File formats are now *not* drivers. All file formats are handles by special "file://" driver, i.e. URI scheme is now always equal to driver. - Supported file formats and sub-formats are discovered from backends separately from drivers. - For discovery, we use DriverInfo and FormatInfo structs. - IoConfig is empty by default; frame length and latency are zero. - Each backend may use its own defaults for IoConfig. - We can retrieve actually selected config using sample_spec() and frame_length() methods of IDevice. - SoxBackend: remove file support, allow only devices (now we use sndfile for files) - SoxBackend: support PCM format and sub-formats - PulseaudioBackend: support PCM format and sub-formats - SndfileBackend: support formats and sub-formats, map to sndfile major type and sub-type - WavBackend: support WAV format and PCM sub-formats - Unification of sndio backends - Bug-fixes in format handling in sndfile backend
- Loading branch information
Showing
201 changed files
with
6,649 additions
and
4,053 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.