diff options
Diffstat (limited to 'servers/audio')
-rw-r--r-- | servers/audio/audio_server_sw.cpp | 4 | ||||
-rw-r--r-- | servers/audio/audio_server_sw.h | 4 | ||||
-rw-r--r-- | servers/audio/sample_manager_sw.cpp | 14 | ||||
-rw-r--r-- | servers/audio/sample_manager_sw.h | 8 |
4 files changed, 15 insertions, 15 deletions
diff --git a/servers/audio/audio_server_sw.cpp b/servers/audio/audio_server_sw.cpp index edf8143eb5..f508a130b4 100644 --- a/servers/audio/audio_server_sw.cpp +++ b/servers/audio/audio_server_sw.cpp @@ -384,11 +384,11 @@ const void* AudioServerSW::sample_get_data_ptr(RID p_sample) const { return sample_manager->sample_get_data_ptr(p_sample); } -void AudioServerSW::sample_set_data(RID p_sample, const DVector<uint8_t>& p_buffer) { +void AudioServerSW::sample_set_data(RID p_sample, const PoolVector<uint8_t>& p_buffer) { AUDIO_LOCK sample_manager->sample_set_data(p_sample,p_buffer); } -DVector<uint8_t> AudioServerSW::sample_get_data(RID p_sample) const { +PoolVector<uint8_t> AudioServerSW::sample_get_data(RID p_sample) const { AUDIO_LOCK return sample_manager->sample_get_data(p_sample); } diff --git a/servers/audio/audio_server_sw.h b/servers/audio/audio_server_sw.h index f97ae8db82..52b45351c3 100644 --- a/servers/audio/audio_server_sw.h +++ b/servers/audio/audio_server_sw.h @@ -125,8 +125,8 @@ public: virtual int sample_get_length(RID p_sample) const; const void* sample_get_data_ptr(RID p_sample) const; - virtual void sample_set_data(RID p_sample, const DVector<uint8_t>& p_buffer); - virtual DVector<uint8_t> sample_get_data(RID p_sample) const; + virtual void sample_set_data(RID p_sample, const PoolVector<uint8_t>& p_buffer); + virtual PoolVector<uint8_t> sample_get_data(RID p_sample) const; virtual void sample_set_mix_rate(RID p_sample,int p_rate); virtual int sample_get_mix_rate(RID p_sample) const; diff --git a/servers/audio/sample_manager_sw.cpp b/servers/audio/sample_manager_sw.cpp index 623bb0f9cb..fe4cc36776 100644 --- a/servers/audio/sample_manager_sw.cpp +++ b/servers/audio/sample_manager_sw.cpp @@ -125,7 +125,7 @@ int SampleManagerMallocSW::sample_get_length(RID p_sample) const { return s->length; } -void SampleManagerMallocSW::sample_set_data(RID p_sample, const DVector<uint8_t>& p_buffer) { +void SampleManagerMallocSW::sample_set_data(RID p_sample, const PoolVector<uint8_t>& p_buffer) { Sample *s = sample_owner.get(p_sample); ERR_FAIL_COND(!s); @@ -137,7 +137,7 @@ void SampleManagerMallocSW::sample_set_data(RID p_sample, const DVector<uint8_t> ERR_EXPLAIN("Sample buffer size does not match sample size."); //print_line("len bytes: "+itos(s->length_bytes)+" bufsize: "+itos(buff_size)); ERR_FAIL_COND(s->length_bytes!=buff_size); - DVector<uint8_t>::Read buffer_r=p_buffer.read(); + PoolVector<uint8_t>::Read buffer_r=p_buffer.read(); const uint8_t *src = buffer_r.ptr(); uint8_t *dst = (uint8_t*)s->data; //print_line("set data: "+itos(s->length_bytes)); @@ -181,14 +181,14 @@ void SampleManagerMallocSW::sample_set_data(RID p_sample, const DVector<uint8_t> } -const DVector<uint8_t> SampleManagerMallocSW::sample_get_data(RID p_sample) const { +const PoolVector<uint8_t> SampleManagerMallocSW::sample_get_data(RID p_sample) const { Sample *s = sample_owner.get(p_sample); - ERR_FAIL_COND_V(!s,DVector<uint8_t>()); + ERR_FAIL_COND_V(!s,PoolVector<uint8_t>()); - DVector<uint8_t> ret_buffer; + PoolVector<uint8_t> ret_buffer; ret_buffer.resize(s->length_bytes); - DVector<uint8_t>::Write buffer_w=ret_buffer.write(); + PoolVector<uint8_t>::Write buffer_w=ret_buffer.write(); uint8_t *dst = buffer_w.ptr(); const uint8_t *src = (const uint8_t*)s->data; @@ -197,7 +197,7 @@ const DVector<uint8_t> SampleManagerMallocSW::sample_get_data(RID p_sample) cons dst[i]=src[i]; } - buffer_w = DVector<uint8_t>::Write(); //unlock + buffer_w = PoolVector<uint8_t>::Write(); //unlock return ret_buffer; } diff --git a/servers/audio/sample_manager_sw.h b/servers/audio/sample_manager_sw.h index ad71723cd6..93cad96f1a 100644 --- a/servers/audio/sample_manager_sw.h +++ b/servers/audio/sample_manager_sw.h @@ -45,8 +45,8 @@ public: virtual bool sample_is_stereo(RID p_sample) const=0; virtual int sample_get_length(RID p_sample) const=0; - virtual void sample_set_data(RID p_sample, const DVector<uint8_t>& p_buffer)=0; - virtual const DVector<uint8_t> sample_get_data(RID p_sample) const=0; + virtual void sample_set_data(RID p_sample, const PoolVector<uint8_t>& p_buffer)=0; + virtual const PoolVector<uint8_t> sample_get_data(RID p_sample) const=0; virtual void *sample_get_data_ptr(RID p_sample) const=0; @@ -102,8 +102,8 @@ public: virtual bool sample_is_stereo(RID p_sample) const; virtual int sample_get_length(RID p_sample) const; - virtual void sample_set_data(RID p_sample, const DVector<uint8_t>& p_buffer); - virtual const DVector<uint8_t> sample_get_data(RID p_sample) const; + virtual void sample_set_data(RID p_sample, const PoolVector<uint8_t>& p_buffer); + virtual const PoolVector<uint8_t> sample_get_data(RID p_sample) const; virtual void *sample_get_data_ptr(RID p_sample) const; |