Skip to content

Commit f574609

Browse files
committed
Using AudioSource objects instead of AudioStreamSource objects as AudioStreamSources were originally designed for streaming via listener interface.
1 parent 4b6b930 commit f574609

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

Pilot_Episode/Effects.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void draw_shot(t8::ScreenHandler<NR, NC>& sh, bool shot_hit, float shot_angle, f
3737

3838
template<int NR, int NC>
3939
void draw_explosion(t8::ScreenHandler<NR, NC>& sh, int r, int c, int anim_ctr,
40-
beat::AudioStreamSource* src_fx, int expl_sound)
40+
beat::AudioSource* src_fx, int expl_sound)
4141
{
4242
using Color = t8::Color;
4343

Pilot_Episode/Enemy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ struct EnemyData
4343
int EnemyData::g_id = -1;
4444
template<int NR, int NC>
4545
EnemyData enemy_step_ai(t8::ScreenHandler<NR, NC>& sh, EnemyData ed,
46-
beat::AudioStreamSource* src_fx,
46+
beat::AudioSource* src_fx,
4747
float x_pos_plane, float y_pos_plane, float x_vel_plane, float y_vel_plane,
4848
const std::vector<std::tuple<int, int, bool>>& plane_hull, bool plane_hiding,
4949
int plane_shot_r, int plane_shot_c, bool plane_shot_fired, bool& shot_down,

Pilot_Episode/Plane.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
template<int NR, int NC>
1515
void generate_engine_smoke(t8::ScreenHandler<NR, NC>& sh,
16-
beat::AudioStreamSource* src_fx_0, beat::AudioStreamSource* src_fx_1,
16+
beat::AudioSource* src_fx_0, beat::AudioSource* src_fx_1,
1717
const t8::RC& rc_plane_engine,
1818
float dt, float time)
1919
{
@@ -287,7 +287,7 @@ void draw_crosshair(t8::ScreenHandler<NR, NC>& sh, float x_vel, float y_vel)
287287

288288
template<int NR, int NC>
289289
void update_plane_controls(t8::ScreenHandler<NR, NC>& sh,
290-
beat::AudioStreamSource* src_fx, beat::WaveformGeneration& wave_gen,
290+
beat::AudioSource* src_fx, beat::WaveformGeneration& wave_gen,
291291
const t8::KeyPressDataPair& kpdp, Key curr_special_key,
292292
float ground_level, float dt)
293293
{

Pilot_Episode/Powerups.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ struct PowerUpData
1212
};
1313
template<size_t N, int NR, int NC>
1414
void draw_update_powerup(t8::ScreenHandler<NR, NC>& sh, std::array<PowerUpData, N>& powerups,
15-
beat::AudioStreamSource* src_fx,
15+
beat::AudioSource* src_fx,
1616
std::vector<std::tuple<int, int, bool>>& plane_hull,
1717
float x_pos, float y_pos,
1818
float cloud_limit, float ground_level,

Pilot_Episode/Seagulls.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ struct SeagullFlockData
6363

6464
template<size_t Nf, int NR, int NC>
6565
void draw_update_seagull_flocks(t8::ScreenHandler<NR, NC>& sh,
66-
beat::AudioStreamSource* src_fx,
66+
beat::AudioSource* src_fx,
6767
std::array<SeagullFlockData, Nf>& seagull_flocks,
6868
float x_pos, float y_pos,
6969
float x_pos_shot, float y_pos_shot, bool& shot_hit, bool& shot_fired,

Pilot_Episode/pilot_episode.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ class Game : public t8x::GameEngine<>
205205

206206
if (enable_audio)
207207
{
208-
src_fx_0 = audio.create_stream_source();
209-
src_fx_1 = audio.create_stream_source();
210-
src_fx_2 = audio.create_stream_source();
208+
src_fx_0 = audio.create_source();
209+
src_fx_1 = audio.create_source();
210+
src_fx_2 = audio.create_source();
211211
}
212212

213213
std::string font_data_path = t8x::get_path_to_font_data(get_exe_folder());
@@ -458,9 +458,9 @@ class Game : public t8x::GameEngine<>
458458
beat::AudioSourceHandler audio;
459459
beat::WaveformGeneration wave_gen;
460460
beat::ChipTuneEngine chip_tune { audio, wave_gen };
461-
beat::AudioStreamSource* src_fx_0 = nullptr;
462-
beat::AudioStreamSource* src_fx_1 = nullptr;
463-
beat::AudioStreamSource* src_fx_2 = nullptr;
461+
beat::AudioSource* src_fx_0 = nullptr;
462+
beat::AudioSource* src_fx_1 = nullptr;
463+
beat::AudioSource* src_fx_2 = nullptr;
464464

465465
std::vector<t8x::ColorScheme> color_schemes;
466466
t8x::FontDataColl font_data;

0 commit comments

Comments
 (0)