From 23fe664dabce0a7aa1890d2968e304b2ea666320 Mon Sep 17 00:00:00 2001 From: Comment Date: Sat, 16 Mar 2013 18:30:46 +0000 Subject: audio processor --- rotord/rotor.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'rotord/rotor.cpp') diff --git a/rotord/rotor.cpp b/rotord/rotor.cpp index f8d48c1..feb4a6c 100644 --- a/rotord/rotor.cpp +++ b/rotord/rotor.cpp @@ -326,7 +326,14 @@ static int open_codec_context(int *stream_idx,AVFormatContext *fmt_ctx, enum AVM bool Render_context::load_audio(string &filename){ - //load audio into memory and create thumbnail + //load audio data from file + //what's the best way to use this? the model is background processing, and we want to update a progress bar + //could pass a function pointer to call when each chunk of data becomes available? + //should the data processing be the responsibility of an object or a function? + //in the case of the audio thumbnail, there will be just one place where its kept + //in the case of audio analysis, the daemon will pass each audio analysis object each chunk of data as it gets it + //there could even be an array of audio analysis functions to perform simultaneously? + //how about a vector of objects that subclass the base audio processor class? av_register_all(); @@ -353,11 +360,12 @@ bool Render_context::load_audio(string &filename){ break; } } - - if (!stream) + if (!stream) { cerr <<"Didn't find any audio stream in the file"<< endl; return false; } + + return true; } -- cgit v1.2.3