summaryrefslogtreecommitdiff
blob: 9a0ecb9aafaf0a69e7858244ef6b096417273f3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--- muroa-9999/muroad/cfloatresampler.cpp
+++ muroa-9999/muroad/cfloatresampler.cpp
@@ -159,11 +159,11 @@
 
 void CFloatResampler::appendFrameToImputBuffer(CAudioFrame* in_frame) {
 
-  float* begin_of_free_inbuffer_space = m_src_data->data_in + m_src_data->input_frames;
+  float* begin_of_free_inbuffer_space = (float*) m_src_data->data_in + m_src_data->input_frames;
   int num_of_singlechannel_samples = in_frame->dataSize() / m_size_of_input_singlechannel_sample;
 
 //  src_short_to_float_array((const short*)(in_frame->dataPtr()), begin_of_free_inbuffer_space, num_of_singlechannel_samples);
-  src_short_to_float_array((const short*)(in_frame->dataPtr()), m_src_data->data_in, num_of_singlechannel_samples);
+  src_short_to_float_array((const short*)(in_frame->dataPtr()), (float*) m_src_data->data_in, num_of_singlechannel_samples);
 
 
   //m_src_data->input_frames += num_of_singlechannel_samples / m_num_channels;
@@ -181,7 +181,7 @@
     
     // copy remaining input (already tranformed float values) to the beginning of the input buffer and set m_in_offset.   
     int frames_to_copy = m_src_data->input_frames - m_src_data->input_frames_used;
-    void* start_addr = m_src_data->data_in + m_src_data->input_frames_used * m_num_channels;
+    void* start_addr = (float*) m_src_data->data_in + m_src_data->input_frames_used * m_num_channels;
     
     // assert that mem areas do not overlap!
     if(frames_to_copy < m_src_data->input_frames_used) {
@@ -189,7 +189,7 @@
     	cerr << "m_src_data->input_frames_used = " << m_src_data->input_frames_used << endl;
     }
     assert(frames_to_copy < m_src_data->input_frames_used);
-    memcpy(m_src_data->data_in, start_addr, frames_to_copy * m_size_of_float_multichannel_sample); 
+    memcpy((float*) m_src_data->data_in, start_addr, frames_to_copy * m_size_of_float_multichannel_sample); 
 
     m_src_data->input_frames = frames_to_copy;