A loaded sound. loaded says whether loading worked. volume_scale scales every stream of it, and
buffer holds the bytes the sound was read from. Make a Sound_Stream from it to play it.
samples: [8] s16;
sound := Sound_Data.{ loaded = true, type = .LINEAR_SAMPLE_ARRAY, nchannels = 1, samples = samples.data, nsamples_times_nchannels = samples.count };
assert(sound.sampling_rate == 44100);Doesn't run in the browser (skipped on wasm).
Fields
- resource: struct { name: string; full_path: string; loaded := false; skip_load := false; }
- type: := Kind.UNINITIALIZED
- nsamples_times_nchannels: s64
- nchannels: u16
- sampling_rate: u32
- buffer: string
- samples: *s16
- volume_scale: float
- silence_before_repeat: float
- filename_to_stream_from: string
- source_directions: [MAX_CHANNELS_PER_SOUND] Source_Direction
- nBlockAlign: s32
- wSamplesPerBlock: s32