Add polyphony to Audio Stream Player nodes
This commit is contained in:
@ -163,7 +163,7 @@ public:
|
||||
AUDIO_DATA_INVALID_ID = -1,
|
||||
MAX_CHANNELS_PER_BUS = 4,
|
||||
MAX_BUSES_PER_PLAYBACK = 6,
|
||||
LOOKAHEAD_BUFFER_SIZE = 32,
|
||||
LOOKAHEAD_BUFFER_SIZE = 64,
|
||||
};
|
||||
|
||||
typedef void (*AudioCallback)(void *p_userdata);
|
||||
@ -262,6 +262,9 @@ private:
|
||||
SafeList<AudioStreamPlaybackListNode *> playback_list;
|
||||
SafeList<AudioStreamPlaybackBusDetails *> bus_details_graveyard;
|
||||
|
||||
// TODO document if this is necessary.
|
||||
SafeList<AudioStreamPlaybackBusDetails *> bus_details_graveyard_frame_old;
|
||||
|
||||
Vector<Vector<AudioFrame>> temp_buffer; //temp_buffer for each level
|
||||
Vector<AudioFrame> mix_buffer;
|
||||
Vector<Bus *> buses;
|
||||
@ -364,8 +367,10 @@ public:
|
||||
void set_playback_speed_scale(float p_scale);
|
||||
float get_playback_speed_scale() const;
|
||||
|
||||
// Convenience method.
|
||||
void start_playback_stream(Ref<AudioStreamPlayback> p_playback, StringName p_bus, Vector<AudioFrame> p_volume_db_vector, float p_start_time = 0);
|
||||
void start_playback_stream(Ref<AudioStreamPlayback> p_playback, Map<StringName, Vector<AudioFrame>> p_bus_volumes, float p_start_time = 0);
|
||||
// Expose all parameters.
|
||||
void start_playback_stream(Ref<AudioStreamPlayback> p_playback, Map<StringName, Vector<AudioFrame>> p_bus_volumes, float p_start_time = 0, float p_highshelf_gain = 0, float p_attenuation_cutoff_hz = 0, float p_pitch_scale = 1);
|
||||
void stop_playback_stream(Ref<AudioStreamPlayback> p_playback);
|
||||
|
||||
void set_playback_bus_exclusive(Ref<AudioStreamPlayback> p_playback, StringName p_bus, Vector<AudioFrame> p_volumes);
|
||||
|
||||
Reference in New Issue
Block a user