From 1d05d2380bb4f1fd265aef55744f432af38b08aa Mon Sep 17 00:00:00 2001 From: Comment Date: Sun, 8 Dec 2013 10:55:03 +0000 Subject: switched signals to double and random to uint16 --- rotord/src/libavwrapper.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'rotord/src/libavwrapper.h') diff --git a/rotord/src/libavwrapper.h b/rotord/src/libavwrapper.h index 7822323..162a77e 100644 --- a/rotord/src/libavwrapper.h +++ b/rotord/src/libavwrapper.h @@ -55,9 +55,9 @@ namespace libav { } void cleanup(); bool open(const std::string& filename); - float get_framerate(){ - if (loaded) return (((float)props->FPSNumerator)/((float)props->FPSDenominator)); - else return -1.0f; + double get_framerate(){ + if (loaded) return (((double)props->FPSNumerator)/((double)props->FPSDenominator)); + else return -1.0; } int get_number_frames(){ if (loaded) return props->NumFrames; @@ -138,8 +138,8 @@ namespace libav { if (props) return props->ChannelLayout; else return 0; } - float get_duration(){ - if (props) return ((float)props->NumSamples)/props->SampleRate; + double get_duration(){ + if (props) return ((double)props->NumSamples)/props->SampleRate; else return 0; } bool get_samples(void *buf,int64_t start, int64_t count){ @@ -181,7 +181,7 @@ namespace libav { bool encodeFrame(uint16_t *samples); void finishRecord(); int get_audio_framesize(){return audioframesize;}; - float get_audio_step(){return audiostep;}; + double get_audio_step(){return audiostep;}; AVStream *add_stream(AVFormatContext *oc, AVCodec **codec,enum AVCodecID codec_id); //AVCodecID bool open_video(AVFormatContext *oc, AVCodec *codec, AVStream *st); @@ -204,7 +204,7 @@ namespace libav { struct SwsContext *sws_ctx; int audioframesize; - float audiostep; + double audiostep; int w; int h; int bitRate; @@ -226,7 +226,7 @@ namespace libav { //************************************************************// // audio output // - float t, tincr, tincr2; + double t, tincr, tincr2; int audio_input_frame_size; -- cgit v1.2.3