Revision d9ef56ba

View differences:

server/src/AudioPlayerRSB.cpp
157 157
    boost::shared_ptr<rst::audition::SoundChunk> request(new rst::audition::SoundChunk());
158 158

  
159 159
    request->set_channels(audio_data->sample_channels);
160
    request->set_data(audio_data->samples.data());
161
/*
162
    if (audio_data.sample_big_endian){
160
    request->set_data(audio_data->samples.data(),audio_data->samples.size());
161

  
162
    if (audio_data->sample_big_endian){
163 163
        request->set_endianness(rst::audition::SoundChunk_EndianNess_ENDIAN_BIG);
164 164
    }else{
165 165
        request->set_endianness(rst::audition::SoundChunk_EndianNess_ENDIAN_LITTLE);
166 166
    }
167 167

  
168
    request->set_rate(audio_data.sample_rate);
169
    request->set_sample_count(audio_data.samples.size() / audio_data.sample_channels / (audio_data.sample_bit/8));
168
    request->set_rate(audio_data->sample_rate);
169
    request->set_sample_count(audio_data->samples.size() / audio_data->sample_channels / (audio_data->sample_bit/8));
170 170

  
171
    switch (audio_data.sample_bit){
171
    switch (audio_data->sample_bit){
172 172
        case(8):
173
            request->set_sample_type(audio_data.sample_signed?(rst::audition::SoundChunk::SAMPLE_S8):(rst::audition::SoundChunk::SAMPLE_U8));
173
            request->set_sample_type(audio_data->sample_signed?(rst::audition::SoundChunk::SAMPLE_S8):(rst::audition::SoundChunk::SAMPLE_U8));
174 174
            break;
175 175
        case(16):
176
            request->set_sample_type(audio_data.sample_signed?(rst::audition::SoundChunk::SAMPLE_S16):(rst::audition::SoundChunk::SAMPLE_U16));
176
            request->set_sample_type(audio_data->sample_signed?(rst::audition::SoundChunk::SAMPLE_S16):(rst::audition::SoundChunk::SAMPLE_U16));
177 177
            break;
178 178
        case(24):
179
            request->set_sample_type(audio_data.sample_signed?(rst::audition::SoundChunk::SAMPLE_S24):(rst::audition::SoundChunk::SAMPLE_U24));
179
            request->set_sample_type(audio_data->sample_signed?(rst::audition::SoundChunk::SAMPLE_S24):(rst::audition::SoundChunk::SAMPLE_U24));
180 180
            break;
181 181
        default:
182 182
            throw runtime_error("AudioPlayerRSB::publish_audio_data() unsupported sample type bit width");
183 183
    }
184
*/
184

  
185
    audio_data_ptr = request;
185 186
    informer->publish(request);
186 187
}
187 188

  

Also available in: Unified diff