Kore 3
Loading...
Searching...
No Matches
soundstream.h
Go to the documentation of this file.
1#ifndef KORE_MIXER_SOUNDSTREAM_HEADER
2#define KORE_MIXER_SOUNDSTREAM_HEADER
3
4#include <kore3/global.h>
5
6#include <stdbool.h>
7#include <stdint.h>
8
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17struct stb_vorbis;
18
20 struct stb_vorbis *vorbis;
21 int chans;
22 int rate;
23 bool myLooping;
24 float myVolume;
25 bool rateDecodedHack;
26 bool end;
27 float samples[2];
28 uint8_t *buffer;
30
37KORE_FUNC kore_mixer_sound_stream *kore_mixer_sound_stream_create(const char *filename, bool looping);
38
45
52
59
66
73
80
87
94
100
107
114
115#ifdef __cplusplus
116}
117#endif
118
119#endif
Provides basic functionality that's used all over the place. There's usually no need to manually incl...
KORE_FUNC int kore_mixer_sound_stream_channels(kore_mixer_sound_stream *stream)
Gets the number of audio-channels the stream uses.
KORE_FUNC bool kore_mixer_sound_stream_ended(kore_mixer_sound_stream *stream)
Returns whether the stream finished playing.
KORE_FUNC float * kore_mixer_sound_stream_next_frame(kore_mixer_sound_stream *stream)
Gets the next audio-frame in the stream.
KORE_FUNC float kore_mixer_sound_stream_volume(kore_mixer_sound_stream *stream)
Gets the stream's volume-multiplicator.
KORE_FUNC bool kore_mixer_sound_stream_looping(kore_mixer_sound_stream *stream)
Returns whether the stream loops automatically.
KORE_FUNC float kore_mixer_sound_stream_length(kore_mixer_sound_stream *stream)
Returns the length of the stream.
KORE_FUNC void kore_mixer_sound_stream_set_volume(kore_mixer_sound_stream *stream, float value)
Sets the stream's volume-multiplicator.
KORE_FUNC kore_mixer_sound_stream * kore_mixer_sound_stream_create(const char *filename, bool looping)
Create a sound-stream from a wav file.
KORE_FUNC void kore_mixer_sound_stream_reset(kore_mixer_sound_stream *stream)
Resets the stream to its start-position.
KORE_FUNC int kore_mixer_sound_stream_sample_rate(kore_mixer_sound_stream *stream)
Gets the sample-rate used by the stream.
KORE_FUNC void kore_mixer_sound_stream_set_looping(kore_mixer_sound_stream *stream, bool loop)
Changes whether the stream is looped automatically.
KORE_FUNC float kore_mixer_sound_stream_position(kore_mixer_sound_stream *stream)
Returns the current playing-position of the stream.
Definition soundstream.h:19