Strip trailing whitespace from all cpp and h files

Originally committed to SVN as r6600.
This commit is contained in:
Thomas Goyne 2012-03-25 04:05:06 +00:00
parent 1077b9b5c4
commit b32515da80
76 changed files with 450 additions and 450 deletions

View file

@ -1,29 +1,29 @@
/*
* Copyright (c) 2004-2009 Mike Matsnev. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice immediately at the beginning of the file, without modification,
* this list of conditions, and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Absolutely no warranty of function or purpose is made by the author
* Mike Matsnev.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice immediately at the beginning of the file, without modification,
* this list of conditions, and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Absolutely no warranty of function or purpose is made by the author
* Mike Matsnev.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/

View file

@ -87,8 +87,8 @@ namespace Endian {
/// @brief DOCME
/// @param val
/// @return
/// @param val
/// @return
///
inline uint16_t Reverse(uint16_t val)
{
@ -99,8 +99,8 @@ namespace Endian {
/// @brief DOCME
/// @param val
/// @return
/// @param val
/// @return
///
inline uint32_t Reverse(uint32_t val)
{
@ -113,8 +113,8 @@ namespace Endian {
/// @brief DOCME
/// @param val
/// @return
/// @param val
/// @return
///
inline uint64_t Reverse(uint64_t val)
{
@ -134,8 +134,8 @@ namespace Endian {
// Regular, fast, templatized conditional reversing
/// @brief DOCME
/// @param val
/// @return
/// @param val
/// @return
///
template <class T>
inline T LittleToMachine(T val)
@ -150,8 +150,8 @@ namespace Endian {
}
/// @brief DOCME
/// @param val
/// @return
/// @param val
/// @return
///
template <class T>
inline T BigToMachine(T val)
@ -166,8 +166,8 @@ namespace Endian {
}
/// @brief DOCME
/// @param val
/// @return
/// @param val
/// @return
///
template <class T>
inline T MachineToLittle(T val)
@ -182,8 +182,8 @@ namespace Endian {
}
/// @brief DOCME
/// @param val
/// @return
/// @param val
/// @return
///
template <class T>
inline T MachineToBig(T val)
@ -242,8 +242,8 @@ namespace Endian {
/// @brief DOCME
/// @param val
/// @return
/// @param val
/// @return
///
inline uint16_t MachineToBig(uint16_t val)
{
@ -257,8 +257,8 @@ namespace Endian {
/// @brief DOCME
/// @param val
/// @return
/// @param val
/// @return
///
inline uint16_t MachineToLittle(uint16_t val)
{
@ -272,8 +272,8 @@ namespace Endian {
/// @brief DOCME
/// @param val
/// @return
/// @param val
/// @return
///
inline uint16_t BigToMachine(uint16_t val)
{
@ -286,8 +286,8 @@ namespace Endian {
/// @brief DOCME
/// @param val
/// @return
/// @param val
/// @return
///
inline uint16_t LittleToMachine(uint16_t val)
{
@ -303,8 +303,8 @@ namespace Endian {
/// @brief DOCME
/// @param val
/// @return
/// @param val
/// @return
///
inline uint32_t MachineToBig(uint32_t val)
{
@ -318,8 +318,8 @@ namespace Endian {
/// @brief DOCME
/// @param val
/// @return
/// @param val
/// @return
///
inline uint32_t MachineToLittle(uint32_t val)
{
@ -333,8 +333,8 @@ namespace Endian {
/// @brief DOCME
/// @param val
/// @return
/// @param val
/// @return
///
inline uint32_t BigToMachine(uint32_t val)
{
@ -349,8 +349,8 @@ namespace Endian {
/// @brief DOCME
/// @param val
/// @return
/// @param val
/// @return
///
inline uint32_t LittleToMachine(uint32_t val)
{
@ -368,8 +368,8 @@ namespace Endian {
/// @brief DOCME
/// @param val
/// @return
/// @param val
/// @return
///
inline uint64_t MachineToBig(uint64_t val)
{
@ -387,8 +387,8 @@ namespace Endian {
/// @brief DOCME
/// @param val
/// @return
/// @param val
/// @return
///
inline uint64_t MachineToLittle(uint64_t val)
{
@ -406,8 +406,8 @@ namespace Endian {
/// @brief DOCME
/// @param val
/// @return
/// @param val
/// @return
///
inline uint64_t BigToMachine(uint64_t val)
{
@ -426,7 +426,7 @@ namespace Endian {
/// @brief DOCME
/// @param val
/// @param val
///
inline uint64_t LittleToMachine(uint64_t val)
{

View file

@ -52,7 +52,7 @@
#include "aegisublocale.h"
#include "standard_paths.h"
/// @brief Constructor
/// @brief Constructor
///
AegisubLocale::AegisubLocale () {
locale = NULL;
@ -67,8 +67,8 @@ AegisubLocale::~AegisubLocale() {
}
/// @brief Initialize
/// @param language
/// @brief Initialize
/// @param language
///
void AegisubLocale::Init(int language) {
if (language == -1) language = wxLANGUAGE_ENGLISH;
@ -95,8 +95,8 @@ void AegisubLocale::Init(int language) {
/// @brief Pick a language
/// @return
/// @brief Pick a language
/// @return
///
int AegisubLocale::PickLanguage() {
// Get list
@ -131,7 +131,7 @@ int AegisubLocale::PickLanguage() {
/// @brief Get list of available languages
/// @brief Get list of available languages
///
wxArrayInt AegisubLocale::GetAvailableLanguages() {
wxArrayInt final;
@ -183,7 +183,7 @@ wxArrayInt AegisubLocale::GetAvailableLanguages() {
for (size_t i=0; i<len; i++) {
const wxLanguageInfo *lang = wxLocale::FindLanguageInfo(langs[i]);
// If the locale file doesn't exist then don't list it as an option.
// If the locale file doesn't exist then don't list it as an option.
wxString locDir = wxStandardPaths::Get().GetLocalizedResourcesDir(langs[i], wxStandardPathsBase::ResourceCat_Messages);
wxFileName file(wxString::Format("%s/%s.mo", locDir, GETTEXT_PACKAGE));
if (lang && file.FileExists()) final.Add(lang->Language);

View file

@ -74,8 +74,8 @@ AssDialogue::AssDialogue(AssDialogue const& that)
}
/// @brief DOCME
/// @param _data
/// @param version
/// @param _data
/// @param version
AssDialogue::AssDialogue(wxString _data,int version)
: AssEntry(wxString(), "[Events]")
, Comment(false)
@ -259,7 +259,7 @@ void AssDialogue::ParseASSTags() {
work = Text.substr(cur, end - cur);
cur = end + 1;
}
if (work.size() && work.Find("\\") == wxNOT_FOUND) {
//We've found an override block with no backslashes
//We're going to assume it's a comment and not consider it an override block

View file

@ -123,7 +123,7 @@ public:
/// @brief DOCME
/// @return
/// @return
///
ASS_BlockType GetType() const { return BLOCK_OVERRIDE; }
wxString GetText();
@ -132,7 +132,7 @@ public:
/// Type of callback function passed to ProcessParameters
typedef void (*ProcessParametersCallback)(wxString,int,AssOverrideParameter*,void *);
/// @brief Process parameters via callback
/// @brief Process parameters via callback
/// @param callback The callback function to call per tag paramer
/// @param userData User data to pass to callback function
void ProcessParameters(ProcessParametersCallback callback,void *userData);
@ -183,7 +183,7 @@ public:
/// Clear all blocks, ALWAYS call this after you're done processing tags
void ClearBlocks();
/// @brief Process parameters via callback
/// @brief Process parameters via callback
/// @param callback The callback function to call per tag parameter
/// @param userData User data to pass to callback function
void ProcessParameters(AssDialogueBlockOverride::ProcessParametersCallback callback,void *userData=NULL);
@ -202,7 +202,7 @@ public:
template<int which>
void SetMarginString(const wxString value) { SetMarginString(value, which);}
/// @brief Set a margin
/// @brief Set a margin
/// @param value New value of the margin
/// @param which 0 = left, 1 = right, 2 = vertical/top, 3 = bottom
void SetMarginString(const wxString value,int which);

View file

@ -83,7 +83,7 @@ void AssExporter::DrawSettings(wxWindow *parent, wxSizer *target_sizer) {
void AssExporter::AddFilter(wxString const& name) {
AssExportFilter *filter = AssExportFilterChain::GetFilter(name);
if (!filter) throw wxString::Format("Filter not found: %s", name);
filters.push_back(filter);

View file

@ -156,7 +156,7 @@ static void load_protos() {
proto[++i].Set("\\shad", VARDATA_FLOAT,PARCLASS_ABSOLUTE_SIZE); // \shad<depth>
proto[++i].Set("\\xshad", VARDATA_FLOAT,PARCLASS_ABSOLUTE_SIZE); // \xshad<depth>
proto[++i].Set("\\yshad", VARDATA_FLOAT,PARCLASS_ABSOLUTE_SIZE); // \yshad<depth>
// \fade(<a1>,<a2>,<a3>,<t1>,<t2>,<t3>,<t4>)
i++;
proto[i].name = "\\fade";

View file

@ -63,8 +63,8 @@ AssColor::AssColor(const wxColour &color)
SetWXColor(color);
}
/// @brief Parse from SSA/ASS
/// @param value
/// @brief Parse from SSA/ASS
/// @param value
void AssColor::Parse(wxString const& value) {
if (value.size() > 0 && value[0] == '#') {
// HTML colour
@ -97,14 +97,14 @@ void AssColor::Parse(wxString const& value) {
a = (outval>>24) & 0xFF;
}
/// @brief Gets a wxColour
/// @return
/// @brief Gets a wxColour
/// @return
wxColour AssColor::GetWXColor() const {
return wxColour(r,g,b,255-a);
}
/// @brief Sets color from wx
/// @param color
/// @brief Sets color from wx
/// @param color
void AssColor::SetWXColor(const wxColor &color) {
r = color.Red();
g = color.Green();
@ -112,11 +112,11 @@ void AssColor::SetWXColor(const wxColor &color) {
//a = color.Alpha();
}
/// @brief Get formatted in ASS format
/// @param alpha
/// @param stripped
/// @param isStyle
/// @return
/// @brief Get formatted in ASS format
/// @param alpha
/// @param stripped
/// @param isStyle
/// @return
wxString AssColor::GetASSFormatted(bool alpha,bool stripped,bool isStyle) const {
wxString work;
if (!stripped) work += "&H";
@ -126,8 +126,8 @@ wxString AssColor::GetASSFormatted(bool alpha,bool stripped,bool isStyle) const
return work;
}
/// @brief Get decimal formatted
/// @return
/// @brief Get decimal formatted
/// @return
wxString AssColor::GetSSAFormatted() const {
long color = (a<<24)+(b<<16)+(g<<8)+r;
wxString output=wxString::Format("%i",(long)color);

View file

@ -53,7 +53,7 @@ AssTime::AssTime(wxString const& text)
size_t pos = 0, end = 0;
int colons = text.Freq(':');
// Set start so that there are only two colons at most
for (; colons > 2; --colons) pos = text.find(':', pos) + 1;
@ -137,7 +137,7 @@ wxString FractionalTime::ToSMPTE(AssTime time, char sep) {
almost 4 seconds (108000 frames versus 107892).
DEATH TO SMPTE
*/
*/
int fps_approx = floor(fps.FPS() + 0.5);
int frames_per_h = 3600*fps_approx;
int frames_per_m = 60*fps_approx;

View file

@ -1051,7 +1051,7 @@ void AudioDisplay::OnMouseEvent(wxMouseEvent& event)
{
SetCursor(wxCursor(wxCURSOR_SIZEWE));
new_obj = timeline.get();
}
if (new_obj)

View file

@ -90,7 +90,7 @@ class ScopedAliveFlag {
ScopedAliveFlag(const ScopedAliveFlag &); // uncopyable
ScopedAliveFlag(); // no default
ScopedAliveFlag& operator=(ScopedAliveFlag const&);
ScopedAliveFlag& operator=(ScopedAliveFlag const&);
public:
explicit ScopedAliveFlag(bool &var) : flag(var) { flag = true; }

View file

@ -46,7 +46,7 @@
#include "main.h"
#include "utils.h"
/// @brief Constructor
/// @brief Constructor
///
DirectSoundPlayer::DirectSoundPlayer() {
playing = false;
@ -61,13 +61,13 @@ DirectSoundPlayer::DirectSoundPlayer() {
thread = NULL;
}
/// @brief Destructor
/// @brief Destructor
///
DirectSoundPlayer::~DirectSoundPlayer() {
CloseStream();
}
/// @brief Open stream
/// @brief Open stream
///
void DirectSoundPlayer::OpenStream() {
// Get provider
@ -117,7 +117,7 @@ void DirectSoundPlayer::OpenStream() {
offset = 0;
}
/// @brief Close stream
/// @brief Close stream
///
void DirectSoundPlayer::CloseStream() {
// Stop it
@ -136,9 +136,9 @@ void DirectSoundPlayer::CloseStream() {
}
}
/// @brief Fill buffer
/// @param fill
/// @return
/// @brief Fill buffer
/// @param fill
/// @return
///
bool DirectSoundPlayer::FillBuffer(bool fill) {
if (playPos >= endPos) return false;
@ -225,9 +225,9 @@ RetryLock:
return playPos < endPos;
}
/// @brief Play
/// @param start
/// @param count
/// @brief Play
/// @param start
/// @param count
///
void DirectSoundPlayer::Play(int64_t start,int64_t count) {
// Make sure that it's stopped
@ -267,8 +267,8 @@ void DirectSoundPlayer::Play(int64_t start,int64_t count) {
if (displayTimer && !displayTimer->IsRunning()) displayTimer->Start(15);
}
/// @brief Stop
/// @param timerToo
/// @brief Stop
/// @param timerToo
///
void DirectSoundPlayer::Stop(bool timerToo) {
// Stop the thread
@ -297,23 +297,23 @@ void DirectSoundPlayer::Stop(bool timerToo) {
}
}
/// @brief Set end
/// @param pos
/// @brief Set end
/// @param pos
///
void DirectSoundPlayer::SetEndPosition(int64_t pos) {
if (playing) endPos = pos;
}
/// @brief Set current position
/// @param pos
/// @brief Set current position
/// @param pos
///
void DirectSoundPlayer::SetCurrentPosition(int64_t pos) {
startPos = playPos = pos;
startTime = GetTickCount();
}
/// @brief Get current position
/// @return
/// @brief Get current position
/// @return
///
int64_t DirectSoundPlayer::GetCurrentPosition() {
// Check if buffer is loaded
@ -326,22 +326,22 @@ int64_t DirectSoundPlayer::GetCurrentPosition() {
return startPos + tdiff * provider->GetSampleRate() / 1000;
}
/// @brief Thread constructor
/// @param par
/// @brief Thread constructor
/// @param par
///
DirectSoundPlayerThread::DirectSoundPlayerThread(DirectSoundPlayer *par) : wxThread(wxTHREAD_JOINABLE) {
parent = par;
stopnotify = CreateEvent(NULL, true, false, NULL);
}
/// @brief Thread destructor
/// @brief Thread destructor
///
DirectSoundPlayerThread::~DirectSoundPlayerThread() {
CloseHandle(stopnotify);
}
/// @brief Thread entry point
/// @return
/// @brief Thread entry point
/// @return
///
wxThread::ExitCode DirectSoundPlayerThread::Entry() {
CoInitialize(0);
@ -390,7 +390,7 @@ wxThread::ExitCode DirectSoundPlayerThread::Entry() {
return 0;
}
/// @brief Stop playback thread
/// @brief Stop playback thread
///
void DirectSoundPlayerThread::Stop() {
// Increase the stopnotify by one, causing a wait for it to succeed

View file

@ -140,17 +140,17 @@ public:
void Stop(bool timerToo=true);
/// @brief DOCME
/// @return
/// @return
///
bool IsPlaying() { return playing; }
/// @brief DOCME
/// @return
/// @return
///
int64_t GetStartPosition() { return startPos; }
/// @brief DOCME
/// @return
/// @return
///
int64_t GetEndPosition() { return endPos; }
int64_t GetCurrentPosition();
@ -158,13 +158,13 @@ public:
void SetCurrentPosition(int64_t pos);
/// @brief DOCME
/// @param vol
/// @return
/// @param vol
/// @return
///
void SetVolume(double vol) { volume = vol; }
/// @brief DOCME
/// @return
/// @return
///
double GetVolume() { return volume; }
};

View file

@ -106,7 +106,7 @@ void PulseAudioPlayer::OpenStream()
// otherwise loop once more
}
//printf("Context connected\n");
// Set up stream
bpf = provider->GetChannels() * provider->GetBytesPerSample();
pa_sample_spec ss;

View file

@ -158,7 +158,7 @@ AudioProvider *AudioProviderFactory::GetProvider(wxString const& filename, int c
throw agi::AudioCacheOpenError("Unknown caching method", 0);
}
/// @brief Register all providers
/// @brief Register all providers
///
void AudioProviderFactory::RegisterProviders() {
#ifdef WITH_AVISYNTH

View file

@ -54,8 +54,8 @@
#include "standard_paths.h"
#include "utils.h"
/// @brief Constructor
/// @param _filename
/// @brief Constructor
/// @param _filename
///
AvisynthAudioProvider::AvisynthAudioProvider(wxString filename)
: filename(filename)
@ -108,8 +108,8 @@ AvisynthAudioProvider::AvisynthAudioProvider(wxString filename)
}
}
/// @brief Read from environment
/// @param _clip
/// @brief Read from environment
/// @param _clip
///
void AvisynthAudioProvider::LoadFromClip(AVSValue _clip) {
AVSValue script;
@ -150,10 +150,10 @@ void AvisynthAudioProvider::LoadFromClip(AVSValue _clip) {
clip = tempclip;
}
/// @brief Get audio
/// @param buf
/// @param start
/// @param count
/// @brief Get audio
/// @param buf
/// @param start
/// @param count
///
void AvisynthAudioProvider::GetAudio(void *buf, int64_t start, int64_t count) const {
// Requested beyond the length of audio

View file

@ -52,7 +52,7 @@
#include "compat.h"
#include "main.h"
/// @brief Constructor
/// @brief Constructor
/// @param filename The filename to open
FFmpegSourceAudioProvider::FFmpegSourceAudioProvider(wxString filename) try
: AudioSource(NULL, FFMS_DestroyAudioSource)
@ -102,7 +102,7 @@ void FFmpegSourceAudioProvider::LoadAudio(wxString filename) {
if (Index && FFMS_IndexBelongsToFile(Index, FileNameShort.utf8_str(), &ErrInfo))
Index = NULL;
// index valid but track number still not set?
if (Index) {
// track number not set? just grab the first track
@ -118,10 +118,10 @@ void FFmpegSourceAudioProvider::LoadAudio(wxString filename) {
Index = NULL;
}
// no valid index exists and the file only has one audio track, index it
else if (TrackNumber < 0)
else if (TrackNumber < 0)
TrackNumber = FFMS_TRACKMASK_ALL;
// else: do nothing (keep track mask as it is)
// moment of truth
if (!Index) {
int TrackMask;

View file

@ -61,7 +61,7 @@
/// @brief DOCME
/// @param filename
/// @param filename
///
PCMAudioProvider::PCMAudioProvider(const wxString &filename)
#ifdef _WIN32
@ -130,9 +130,9 @@ PCMAudioProvider::~PCMAudioProvider()
}
/// @brief DOCME
/// @param range_start
/// @param range_length
/// @return
/// @param range_start
/// @param range_length
/// @return
///
char * PCMAudioProvider::EnsureRangeAccessible(int64_t range_start, int64_t range_length) const
{
@ -203,9 +203,9 @@ char * PCMAudioProvider::EnsureRangeAccessible(int64_t range_start, int64_t rang
}
/// @brief DOCME
/// @param buf
/// @param start
/// @param count
/// @param buf
/// @param start
/// @param count
///
void PCMAudioProvider::GetAudio(void *buf, int64_t start, int64_t count) const
{
@ -308,7 +308,7 @@ class RiffWavPCMAudioProvider : public PCMAudioProvider {
public:
/// @brief DOCME
/// @param _filename
/// @param _filename
///
RiffWavPCMAudioProvider(const wxString &_filename)
: PCMAudioProvider(_filename)
@ -388,7 +388,7 @@ public:
}
/// @brief DOCME
/// @return
/// @return
///
bool AreSamplesNativeEndian() const
{
@ -486,9 +486,9 @@ class Wave64AudioProvider : public PCMAudioProvider {
};
/// @brief DOCME
/// @param guid1
/// @param guid2
/// @return
/// @param guid1
/// @param guid2
/// @return
///
inline bool CheckGuid(const uint8_t *guid1, const uint8_t *guid2)
{
@ -498,7 +498,7 @@ class Wave64AudioProvider : public PCMAudioProvider {
public:
/// @brief DOCME
/// @param _filename
/// @param _filename
///
Wave64AudioProvider(const wxString &_filename)
: PCMAudioProvider(_filename)
@ -579,7 +579,7 @@ public:
}
/// @brief DOCME
/// @return
/// @return
///
bool AreSamplesNativeEndian() const
{

View file

@ -138,10 +138,10 @@ void RAMAudioProvider::GetAudio(void *buf, int64_t start, int64_t count) const {
int i = (start*bytes_per_sample) >> CacheBits;
int start_offset = (start*bytes_per_sample) & (CacheBlockSize-1);
int64_t bytesremaining = count*bytes_per_sample;
// Copy
while (bytesremaining) {
int readsize = std::min<int>(bytesremaining, CacheBlockSize - start_offset);
int readsize = std::min<int>(bytesremaining, CacheBlockSize - start_offset);
memcpy(charbuf,(char *)(blockcache[i++]+start_offset),readsize);

View file

@ -275,7 +275,7 @@ void AudioRendererBitmapProvider::SetMillisecondsPerPixel(double new_pixel_ms)
if (pixel_ms == new_pixel_ms) return;
pixel_ms = new_pixel_ms;
OnSetMillisecondsPerPixel();
}

View file

@ -108,7 +108,7 @@ void AudioWaveformRenderer::Render(wxBitmap &bmp, int start, AudioRenderingStyle
{
provider->GetAudio(audio_buffer, (int64_t)cur_sample, (int64_t)pixel_samples);
cur_sample += pixel_samples;
int peak_min = 0, peak_max = 0;
int64_t avg_min_accum = 0, avg_max_accum = 0;
const int16_t *aud = (const int16_t *)audio_buffer;

View file

@ -83,7 +83,7 @@ public:
virtual void GetRenderingStyles(AudioRenderingStyleRanges &ranges) const = 0;
/// @brief Go to next timing unit
///
///
/// Advances the timing controller cursor to the next timing unit, for
/// example the next dialogue line or the next karaoke syllable.
virtual void Next() = 0;

View file

@ -169,7 +169,7 @@ AudioTimingControllerKaraoke::AudioTimingControllerKaraoke(agi::Context *c, AssK
video_position_provider.AddMarkerMovedListener(std::tr1::bind(std::tr1::ref(AnnounceMarkerMoved)));
Revert();
}
void AudioTimingControllerKaraoke::OnAutoCommitChange(agi::OptionValue const& opt) {

View file

@ -110,7 +110,7 @@ namespace Automation4 {
HFONT thefont = CreateFontIndirect(&lf);
if (!thefont) return false;
SelectObject(thedc, thefont);
SIZE sz;
size_t thetextlen = text.length();
const TCHAR *thetext = text.wc_str();

View file

@ -262,7 +262,7 @@ namespace {
}
int regex_init(lua_State *L)
{
{
if (luaL_newmetatable(L, "aegisub.regex")) {
set_field(L, "__gc", regex_gc);
lua_pop(L, 1);

View file

@ -45,8 +45,8 @@ enum { AVISYNTH_INTERFACE_VERSION = 3 };
/* Define all types necessary for interfacing with avisynth.dll
Moved from internal.h */
// Win32 API macros, notably the types BYTE, DWORD, ULONG, etc.
#include <windef.h>
// Win32 API macros, notably the types BYTE, DWORD, ULONG, etc.
#include <windef.h>
// COM interface macros
#include <objbase.h>
@ -79,7 +79,7 @@ typedef long PixOffset;
#define _RPT2(a,b,c,d) ((void)0)
#define _RPT3(a,b,c,d,e) ((void)0)
#define _RPT4(a,b,c,d,e,f) ((void)0)
#define _ASSERTE(x) assert(x)
#include <assert.h>
#endif
@ -101,7 +101,7 @@ typedef long PixOffset;
typedef float SFLOAT;
enum {SAMPLE_INT8 = 1<<0,
SAMPLE_INT16 = 1<<1,
SAMPLE_INT16 = 1<<1,
SAMPLE_INT24 = 1<<2, // Int24 is a very stupid thing to code, but it's supported by some hardware.
SAMPLE_INT32 = 1<<3,
SAMPLE_FLOAT = 1<<4};
@ -124,7 +124,7 @@ struct VideoInfo {
// Colorspace properties.
enum {
CS_BGR = 1<<28,
CS_BGR = 1<<28,
CS_YUV = 1<<29,
CS_INTERLEAVED = 1<<30,
CS_PLANAR = 1<<31
@ -140,7 +140,7 @@ struct VideoInfo {
CS_IYUV = 1<<4 | CS_YUV | CS_PLANAR // same as above
};
int pixel_type; // changed to int as of 2.5
int audio_samples_per_second; // 0 means no audio
int sample_type; // as of 2.5
@ -164,7 +164,7 @@ struct VideoInfo {
bool IsRGB24() const { return (pixel_type&CS_BGR24)==CS_BGR24; } // Clear out additional properties
bool IsRGB32() const { return (pixel_type & CS_BGR32) == CS_BGR32 ; }
bool IsYUV() const { return !!(pixel_type&CS_YUV ); }
bool IsYUY2() const { return (pixel_type & CS_YUY2) == CS_YUY2; }
bool IsYUY2() const { return (pixel_type & CS_YUY2) == CS_YUY2; }
bool IsYV12() const { return ((pixel_type & CS_YV12) == CS_YV12)||((pixel_type & CS_I420) == CS_I420); }
bool IsColorSpace(int c_space) const { return ((pixel_type & c_space) == c_space); }
bool Is(int property) const { return ((pixel_type & property)==property ); }
@ -173,8 +173,8 @@ struct VideoInfo {
bool IsParityKnown() const { return ((image_type & IT_FIELDBASED)&&(image_type & (IT_BFF|IT_TFF))); }
bool IsBFF() const { return !!(image_type & IT_BFF); }
bool IsTFF() const { return !!(image_type & IT_TFF); }
bool IsVPlaneFirst() const {return ((pixel_type & CS_YV12) == CS_YV12); } // Don't use this
bool IsVPlaneFirst() const {return ((pixel_type & CS_YV12) == CS_YV12); } // Don't use this
int BytesFromPixels(int pixels) const { return pixels * (BitsPerPixel()>>3); } // Will not work on planar images, but will return only luma planes
int RowSize() const { return BytesFromPixels(width); } // Also only returns first plane on planar images
int BMPSize() const { if (IsPlanar()) {int p = height * ((RowSize()+3) & ~3); p+=p>>1; return p; } return height * ((RowSize()+3) & ~3); }
@ -191,7 +191,7 @@ struct VideoInfo {
void Set(int property) { image_type|=property; }
void Clear(int property) { image_type&=~property; }
int BitsPerPixel() const {
int BitsPerPixel() const {
switch (pixel_type) {
case CS_BGR24:
return 24;
@ -206,7 +206,7 @@ struct VideoInfo {
return 0;
}
}
int BytesPerChannelSample() const {
int BytesPerChannelSample() const {
switch (sample_type) {
case SAMPLE_INT8:
return sizeof(signed char);
@ -343,20 +343,20 @@ public:
int GetPitch() const { return pitch; }
int GetPitch(int plane) const { switch (plane) {case PLANAR_U: case PLANAR_V: return pitchUV;} return pitch; }
int GetRowSize() const { return row_size; }
int GetRowSize(int plane) const {
int GetRowSize(int plane) const {
switch (plane) {
case PLANAR_U: case PLANAR_V: if (pitchUV) return row_size>>1; else return 0;
case PLANAR_U_ALIGNED: case PLANAR_V_ALIGNED:
if (pitchUV) {
case PLANAR_U_ALIGNED: case PLANAR_V_ALIGNED:
if (pitchUV) {
int r = ((row_size+FRAME_ALIGN-1)&(~(FRAME_ALIGN-1)) )>>1; // Aligned rowsize
if (r<=pitchUV)
return r;
return row_size>>1;
if (r<=pitchUV)
return r;
return row_size>>1;
} else return 0;
case PLANAR_Y_ALIGNED:
int r = (row_size+FRAME_ALIGN-1)&(~(FRAME_ALIGN-1)); // Aligned rowsize
if (r<=pitch)
return r;
if (r<=pitch)
return r;
return row_size;
}
return row_size; }
@ -419,7 +419,7 @@ public:
IClip() : refcnt(0) {}
virtual int __stdcall GetVersion() { return AVISYNTH_INTERFACE_VERSION; }
virtual PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env) = 0;
virtual bool __stdcall GetParity(int n) = 0; // return field parity if field_based, else parity of first field in frame
virtual void __stdcall GetAudio(void* buf, __int64 start, __int64 count, IScriptEnvironment* env) = 0; // start and count are in samples
@ -529,8 +529,8 @@ public:
PClip AsClip() const { _ASSERTE(IsClip()); return IsClip()?clip:0; }
bool AsBool() const { _ASSERTE(IsBool()); return boolean; }
int AsInt() const { _ASSERTE(IsInt()); return integer; }
// int AsLong() const { _ASSERTE(IsLong()); return longlong; }
int AsInt() const { _ASSERTE(IsInt()); return integer; }
// int AsLong() const { _ASSERTE(IsLong()); return longlong; }
const char* AsString() const { _ASSERTE(IsString()); return IsString()?string:0; }
double AsFloat() const { _ASSERTE(IsFloat()); return IsInt()?integer:floating_pt; }
@ -599,7 +599,7 @@ public:
/* Helper classes useful to plugin authors */
class AlignPlanar : public GenericVideoFilter
class AlignPlanar : public GenericVideoFilter
{
public:
AlignPlanar(PClip _clip);
@ -609,7 +609,7 @@ public:
class FillBorder : public GenericVideoFilter
class FillBorder : public GenericVideoFilter
{
public:
FillBorder(PClip _clip);
@ -619,7 +619,7 @@ public:
class ConvertAudio : public GenericVideoFilter
class ConvertAudio : public GenericVideoFilter
/**
* Helper class to convert audio to any format
**/
@ -662,7 +662,7 @@ private:
// For GetCPUFlags. These are backwards-compatible with those in VirtualDub.
enum {
enum {
/* slowest CPU to support extension */
CPUF_FORCE = 0x01, // N/A
CPUF_FPU = 0x02, // 386/486DX

View file

@ -217,12 +217,12 @@ void hsv_to_rgb(int H, int S, int V, unsigned char *R, unsigned char *G, unsigne
unsigned int q = v * (65535 - (f * s)/256) / 65536;
unsigned int t = v * (65535 - ((255 - f) * s)/256) / 65536;
switch (Hi) {
case 0:
case 0:
r = v;
g = t;
b = p;
break;
case 1:
case 1:
r = q;
g = v;
b = p;

View file

@ -89,7 +89,7 @@ wxColour ColourButton::GetColour() {
}
/// @brief Click handler
/// @param event
/// @param event
void ColourButton::OnClick(wxCommandEvent &event) {
if (event.GetClientData() != this)
GetColorFromUser<ColourButton, &ColourButton::SetColour>(GetParent(), colour, this);

View file

@ -93,7 +93,7 @@ struct audio_open : public Command {
void operator()(agi::Context *c) {
try {
wxString path = lagi_wxString(OPT_GET("Path/Last/Audio")->GetString());
wxString path = lagi_wxString(OPT_GET("Path/Last/Audio")->GetString());
wxString str = _("Audio Formats") + " (*.aac,*.ac3,*.ape,*.dts,*.flac,*.m4a,*.mka,*.mp3,*.mp4,*.ogg,*.w64,*.wav,*.wma)|*.aac;*.ac3;*.ape;*.dts;*.flac;*.m4a;*.mka;*.mp3;*.mp4;*.ogg;*.w64;*.wav;*.wma|"
+ _("Video Formats") + " (*.asf,*.avi,*.avs,*.d2v,*.m2ts,*.mkv,*.mov,*.mp4,*.mpeg,*.mpg,*.ogm,*.wmv,*.ts)|*.asf;*.avi;*.avs;*.d2v;*.m2ts;*.mkv;*.mov;*.mp4;*.mpeg;*.mpg;*.ogm;*.wmv;*.ts|"
+ _("All Files") + " (*.*)|*.*";

View file

@ -125,7 +125,7 @@ struct recent_video_entry : public Command {
};
/// @class mru_wrapper
/// @brief Wrapper class for mru commands to
/// @brief Wrapper class for mru commands to
template<class T>
class mru_wrapper : public T {
int id;

View file

@ -259,7 +259,7 @@ struct subtitle_open : public Command {
STR_HELP("Opens a subtitles file")
void operator()(agi::Context *c) {
wxString path = lagi_wxString(OPT_GET("Path/Last/Subtitles")->GetString());
wxString path = lagi_wxString(OPT_GET("Path/Last/Subtitles")->GetString());
wxString filename = wxFileSelector(_("Open subtitles file"),path,"","",AssFile::GetWildcardList(0),wxFD_OPEN | wxFD_FILE_MUST_EXIST);
if (!filename.empty()) {
wxGetApp().frame->LoadSubtitles(filename);

View file

@ -95,9 +95,9 @@ static ResolutionShortcut resolutions[] = {
/// @brief DOCME
/// @param parent
/// @param out_filename
/// @return
/// @param parent
/// @param out_filename
/// @return
///
bool DialogDummyVideo::CreateDummyVideo(wxWindow *parent, wxString &out_filename)
{
@ -156,7 +156,7 @@ bool DialogDummyVideo::CreateDummyVideo(wxWindow *parent, wxString &out_filename