summaryrefslogtreecommitdiff
path: root/rotord/libavaudioloader.cpp
diff options
context:
space:
mode:
authorTim Redfern <tim@herge.(none)>2013-04-25 13:33:05 +0100
committerTim Redfern <tim@herge.(none)>2013-04-25 13:33:05 +0100
commit1de09c4f69fed0d4adc3d8c1ed19473db4a342b0 (patch)
tree4c0b04608ec72307b68e08aa6d4f84a2f5cf041d /rotord/libavaudioloader.cpp
parent740768a0d6b13ecc3eb68219f6eee208ab4ecc1d (diff)
GET styles
Diffstat (limited to 'rotord/libavaudioloader.cpp')
-rw-r--r--rotord/libavaudioloader.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/rotord/libavaudioloader.cpp b/rotord/libavaudioloader.cpp
index b9beabc..c6c1355 100644
--- a/rotord/libavaudioloader.cpp
+++ b/rotord/libavaudioloader.cpp
@@ -177,9 +177,11 @@ uint16_t* libav::Audioloader::get_samples(int num){ //presumes 16bpc here
}
//std::cerr<<"filling buffer to "<<((sample_end+frame->nb_samples)*frame->channels)<<std::endl;
+
for (int i=0;i<frame->nb_samples;i++) {
for (int j=0;j<av_frame_get_channels(frame);j++) {
buffer[((sample_end+i)*frame->channels)+j]= ((uint16_t*) frame->buf[j]->data)[i];
+ //buffer[(j*frame->channels)+(sample_end+i)]= ((uint16_t*) frame->buf[j]->data)[i]; ??planar?? nope
}
}
sample_end+=frame->nb_samples;