mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-01 02:56:43 +01:00
emscripten: fix a typo in al_get_audio_stream_length_secs stub
This commit is contained in:
parent
dbd047c64e
commit
7d9adc8d14
2 changed files with 6 additions and 6 deletions
|
@ -37,7 +37,7 @@
|
|||
#undef al_get_audio_stream_playing
|
||||
#undef al_get_audio_stream_playmode
|
||||
#undef al_get_audio_stream_attached
|
||||
#undef al_get_audio_stream_length_sec
|
||||
#undef al_get_audio_stream_length_secs
|
||||
#undef al_get_audio_stream_position_secs
|
||||
#undef al_get_audio_stream_played_samples
|
||||
#undef al_get_audio_stream_fragment
|
||||
|
@ -205,7 +205,7 @@ SYMBOL_EXPORT unsigned int emscripten_get_available_audio_stream_fragments(ALLEG
|
|||
return 0;
|
||||
}
|
||||
|
||||
SYMBOL_EXPORT double emscripten_get_audio_stream_length_sec(ALLEGRO_AUDIO_STREAM *stream) {
|
||||
SYMBOL_EXPORT double emscripten_get_audio_stream_length_secs(ALLEGRO_AUDIO_STREAM *stream) {
|
||||
EMSCRIPTEN_AUDIO_STREAM *s = (EMSCRIPTEN_AUDIO_STREAM*)stream;
|
||||
unsigned int samples_per_sec = al_get_sample_instance_frequency(s->instance);
|
||||
return al_get_sample_instance_length(s->instance) / (double)samples_per_sec;
|
||||
|
@ -213,7 +213,7 @@ SYMBOL_EXPORT double emscripten_get_audio_stream_length_sec(ALLEGRO_AUDIO_STREAM
|
|||
|
||||
SYMBOL_EXPORT bool emscripten_seek_audio_stream_secs(ALLEGRO_AUDIO_STREAM *stream, double val) {
|
||||
EMSCRIPTEN_AUDIO_STREAM *s = (EMSCRIPTEN_AUDIO_STREAM*)stream;
|
||||
double length = emscripten_get_audio_stream_length_sec(stream);
|
||||
double length = emscripten_get_audio_stream_length_secs(stream);
|
||||
unsigned int samples = emscripten_get_audio_stream_length(stream);
|
||||
return al_set_sample_instance_position(s->instance, samples * (val / length));
|
||||
}
|
||||
|
@ -221,7 +221,7 @@ SYMBOL_EXPORT bool emscripten_seek_audio_stream_secs(ALLEGRO_AUDIO_STREAM *strea
|
|||
SYMBOL_EXPORT double emscripten_get_audio_stream_position_secs(ALLEGRO_AUDIO_STREAM *stream) {
|
||||
EMSCRIPTEN_AUDIO_STREAM *s = (EMSCRIPTEN_AUDIO_STREAM*)stream;
|
||||
double sample_pos = al_get_sample_instance_position(s->instance);
|
||||
double length = emscripten_get_audio_stream_length_sec(stream);
|
||||
double length = emscripten_get_audio_stream_length_secs(stream);
|
||||
unsigned int samples = emscripten_get_audio_stream_length(stream);
|
||||
return length * (sample_pos / (double)samples);
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ float emscripten_get_audio_stream_gain(ALLEGRO_AUDIO_STREAM* stream);
|
|||
float emscripten_get_audio_stream_pan(ALLEGRO_AUDIO_STREAM* stream);
|
||||
bool emscripten_set_audio_stream_speed(ALLEGRO_AUDIO_STREAM* stream, float val);
|
||||
bool emscripten_set_audio_stream_pan(ALLEGRO_AUDIO_STREAM* stream, float val);
|
||||
double emscripten_get_audio_stream_length_sec(ALLEGRO_AUDIO_STREAM* stream);
|
||||
double emscripten_get_audio_stream_length_secs(ALLEGRO_AUDIO_STREAM* stream);
|
||||
bool emscripten_seek_audio_stream_secs(ALLEGRO_AUDIO_STREAM* stream, double val);
|
||||
double emscripten_get_audio_stream_position_secs(ALLEGRO_AUDIO_STREAM* stream);
|
||||
void emscripten_destroy_audio_stream(ALLEGRO_AUDIO_STREAM* stream);
|
||||
|
@ -87,7 +87,7 @@ ALLEGRO_AUDIO_STREAM* emscripten_create_audio_stream(size_t fragment_count, unsi
|
|||
#define al_get_audio_stream_speed emscripten_get_audio_stream_speed
|
||||
#define al_get_audio_stream_gain emscripten_get_audio_stream_gain
|
||||
#define al_get_audio_stream_pan emscripten_get_audio_stream_pan
|
||||
#define al_get_audio_stream_length_sec emscripten_get_audio_stream_length_sec
|
||||
#define al_get_audio_stream_length_secs emscripten_get_audio_stream_length_secs
|
||||
#define al_get_audio_stream_position_secs emscripten_get_audio_stream_position_secs
|
||||
#define al_get_audio_stream_played_samples emscripten_get_audio_stream_played_samples
|
||||
#define al_get_audio_stream_fragment emscripten_get_audio_stream_fragment
|
||||
|
|
Loading…
Reference in a new issue