Skip to content

Commit

Permalink
Update dualsynth platform: Add audio
Browse files Browse the repository at this point in the history
  • Loading branch information
msg7086 committed Jun 3, 2020
1 parent 69f762b commit 8cd107e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion include/dualsynth/ds_videoinfo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ struct DSVideoInfo
int Width {0}, Height {0};
int Frames {0};

int Audio_SPS {0};
int Audio_SType {0};
int64_t Audio_NSamples {0};
int Audio_NChannels {0};

DSVideoInfo() {}
DSVideoInfo(DSFormat format, int64_t fpsnum, int64_t fpsdenom, int width, int height, int frames)
: Format(format)
Expand All @@ -32,11 +37,15 @@ struct DSVideoInfo
, FPSNum(avsvi.fps_numerator), FPSDenom(avsvi.fps_denominator)
, Width(avsvi.width), Height(avsvi.height)
, Frames(avsvi.num_frames)
, Audio_SPS(avsvi.audio_samples_per_second)
, Audio_SType(avsvi.sample_type)
, Audio_NSamples(avsvi.num_audio_samples)
, Audio_NChannels(avsvi.nchannels)
{ }
const VSVideoInfo* ToVSVI(const VSCore* vscore, const VSAPI* vsapi) {
return new VSVideoInfo {Format.ToVSFormat(vscore, vsapi), FPSNum, FPSDenom, Width, Height, Frames, 0};
}
const VideoInfo ToAVSVI() {
return VideoInfo{Width, Height, static_cast<unsigned>(FPSNum), static_cast<unsigned>(FPSDenom), Frames, Format.ToAVSFormat()};
return VideoInfo{Width, Height, static_cast<unsigned>(FPSNum), static_cast<unsigned>(FPSDenom), Frames, Format.ToAVSFormat(), Audio_SPS, Audio_SType, Audio_NSamples, Audio_NChannels};
}
};

0 comments on commit 8cd107e

Please sign in to comment.