Skip to main content

Crate sim_lib_stream_file

Crate sim_lib_stream_file 

Source
Expand description

File-backed source and sink adapters for STREAM 6.

The crate keeps host filesystem access behind explicit stream file capabilities and records each read or write as a KERNEL 6 filesystem effect. SMF support reuses the in-tree MIDI file codec; WAV support is limited to canonical little-endian PCM16 RIFF/WAVE because that is the PCM packet format implemented by the stream audio layer.

Structs§

WavStream
A PCM stream decoded from a WAV file together with its sample format.

Functions§

cassette_expr_to_stream
Decodes a cassette expression and replays it as a stream.
cassette_to_stream
Replays a recorded cassette back into a stream.
pcm_buffers_to_wav_bytes
Encodes PCM buffers into canonical PCM16 WAV bytes.
read_smf_stream
Reads a Standard MIDI File from path and opens it as a MIDI stream.
read_wav_stream
Reads a canonical PCM16 WAV file from path and opens it as a PCM stream.
smf_bytes_to_stream
Parses Standard MIDI File bytes and opens them as a MIDI stream.
smf_file_to_stream
Opens an already-parsed Standard MIDI File as a MIDI stream.
stream_file_read_capability
Returns the capability gating filesystem reads (stream.file.read).
stream_file_write_capability
Returns the capability gating filesystem writes (stream.file.write).
stream_to_cassette
Records a stream into a cassette using the given transport profile.
stream_to_cassette_expr
Records a stream into a cassette and encodes it as an expression.
stream_to_smf_bytes
Drains a MIDI stream and encodes it as Standard MIDI File bytes.
stream_to_smf_file
Drains a MIDI stream into a single-track SmfFile with tpq resolution.
stream_to_wav_bytes
Drains a PCM stream and encodes it as canonical PCM16 WAV bytes.
validate_cassette_fixture_path
Validates a cassette against a golden fixture file at path.
wav_bytes_to_stream
Decodes canonical PCM16 WAV bytes and opens them as a PCM stream.
write_smf_stream
Drains a MIDI stream and writes it to path as a Standard MIDI File.
write_wav_stream
Drains a PCM stream and writes it to path as a canonical PCM16 WAV file.