1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-08 14:13:57 +01:00

Remove trailing spaces.

This commit is contained in:
benjamin.drung@gmail.com
2014-06-03 20:30:19 +00:00
parent d921c4969b
commit 277932dccb
380 changed files with 6489 additions and 6491 deletions

View File

@@ -138,7 +138,7 @@ wxString AudioUnitEffect::GetEffectIdentifier()
wxString AudioUnitEffect::GetEffectAction()
{
return wxString::Format(_("Performing Effect: %s"),
return wxString::Format(_("Performing Effect: %s"),
mName.c_str());
}
@@ -159,7 +159,7 @@ bool AudioUnitEffect::Init()
mSupportsMono = SetRateAndChannels(mUnit, 1, 44100.0);
mSupportsStereo = SetRateAndChannels(mUnit, 2, 44100.0);
if (!mSupportsMono && !mSupportsStereo) {
printf("Audio Unit doesn't support mono or stereo.\n");
return false;
@@ -190,14 +190,14 @@ bool AudioUnitEffect::PromptUser()
dlog.ShowModal();
CloseComponent(carbonView);
return (dlog.GetReturnCode() == wxID_OK);
}
bool AudioUnitEffect::Process()
{
bool bGoodResult = true;
CopyInputTracks();
TrackListIterator iter(mOutputTracks);
@@ -209,10 +209,10 @@ bool AudioUnitEffect::Process()
sampleCount lstart, rstart;
sampleCount len;
GetSamples((WaveTrack *)left, &lstart, &len);
right = NULL;
if (left->GetLinked() && mSupportsStereo) {
right = iter.Next();
right = iter.Next();
GetSamples((WaveTrack *)right, &rstart, &len);
}
@@ -234,16 +234,16 @@ bool AudioUnitEffect::Process()
bGoodResult = false;
break;
}
left = iter.Next();
count++;
}
ReplaceProcessedTracks(bGoodResult);
ReplaceProcessedTracks(bGoodResult);
return bGoodResult;
}
void AudioUnitEffect::End()
{
}
@@ -272,7 +272,7 @@ bool AudioUnitEffect::SetRateAndChannels(AudioUnit unit,
streamFormat.mFramesPerPacket = 1;
streamFormat.mBytesPerFrame = 4;
streamFormat.mBytesPerPacket = 4;
auResult = AudioUnitSetProperty(unit, kAudioUnitProperty_StreamFormat,
kAudioUnitScope_Input, 0,
&streamFormat,
@@ -333,7 +333,7 @@ bool AudioUnitEffect::CopyParameters(AudioUnit srcUnit, AudioUnit dstUnit)
printf("Couldn't get parameter list\n");
delete[] parameters;
return false;
}
}
// Copy the parameters from the main unit to the unit specific to
// this track
@@ -409,7 +409,7 @@ bool AudioUnitEffect::ProcessStereo(int count,
}
auResult = AudioUnitInitialize(trackUnit);
if (auResult != 0) {
if (auResult != 0) {
printf("Couldn't initialize audio unit\n");
return false;
}
@@ -457,7 +457,7 @@ bool AudioUnitEffect::ProcessStereo(int count,
bufferList = (AudioBufferList *)malloc(sizeof(UInt32) +
numChannels * sizeof(AudioBuffer));
if (!bufferList)
if (!bufferList)
{
printf("Setting input render callback failed.\n");
AudioUnitUninitialize(trackUnit);
@@ -520,7 +520,7 @@ bool AudioUnitEffect::ProcessStereo(int count,
}
}
}
if (bufferList) {
free(bufferList);
}
@@ -590,11 +590,11 @@ bool AudioUnitEffect::DoRender(AudioUnit unit,
// static
OSStatus AudioUnitEffect::SimpleAudioRenderCallback
(void *inRefCon,
(void *inRefCon,
AudioUnitRenderActionFlags *inActionFlags,
const AudioTimeStamp *inTimeStamp,
const AudioTimeStamp *inTimeStamp,
UInt32 inBusNumber,
UInt32 inNumFrames,
UInt32 inNumFrames,
AudioBufferList *ioData)
{
AudioUnitEffect *This = (AudioUnitEffect *)inRefCon;
@@ -656,14 +656,14 @@ bool AudioUnitGUIControl::Create(wxWindow *parent, wxWindowID id,
ControlRef controlRef)
{
m_macIsUserPane = FALSE ;
if ( !wxControl::Create(parent, id, pos, size,
0, wxDefaultValidator,
wxString(wxT("AudioUnitControl"))) )
return false;
m_peer = new wxMacControl(this, controlRef);
Rect outBounds;
GetControlBounds(controlRef, &outBounds);
@@ -671,9 +671,9 @@ bool AudioUnitGUIControl::Create(wxWindow *parent, wxWindowID id,
pos.y = outBounds.top;
size.x = outBounds.right - outBounds.left;
size.y = outBounds.bottom - outBounds.top;
MacPostControlCreate(pos, size);
return true;
}
@@ -683,16 +683,16 @@ short AudioUnitGUIControl::GetModifiers(wxMouseEvent &event)
if ( !event.m_leftDown && !event.m_rightDown )
modifiers |= btnState ;
if ( event.m_shiftDown )
modifiers |= shiftKey ;
if ( event.m_controlDown )
modifiers |= controlKey ;
if ( event.m_altDown )
modifiers |= optionKey ;
if ( event.m_metaDown )
modifiers |= cmdKey ;
@@ -703,17 +703,17 @@ void AudioUnitGUIControl::OnMouse(wxMouseEvent &event)
{
int x = event.m_x ;
int y = event.m_y ;
MacClientToRootWindow( &x , &y ) ;
Point localwhere ;
ControlHandle control;
localwhere.h = x ;
localwhere.v = y ;
short modifiers = GetModifiers(event);
if (event.GetEventType() == wxEVT_LEFT_DOWN ||
event.GetEventType() == wxEVT_LEFT_DCLICK ) {
#if ((wxMAJOR_VERSION == 2) && (wxMINOR_VERSION <= 4))
@@ -723,15 +723,15 @@ void AudioUnitGUIControl::OnMouse(wxMouseEvent &event)
#endif
ControlPartCode code;
code = FindControl(localwhere,
rootWindow,
&control);
if (code) {
Rect outBounds;
GetControlBounds((ControlRef)control, &outBounds);
code = ::HandleControlClick(control,
localwhere, modifiers,
(ControlActionUPP)-1) ;
@@ -765,9 +765,9 @@ static pascal OSStatus EventHandler(EventHandlerCallRef handler, EventRef event,
}
void EventListener(void *inUserData, AudioUnitCarbonView inView,
void EventListener(void *inUserData, AudioUnitCarbonView inView,
const AudioUnitParameter *inParameter,
AudioUnitCarbonViewEventID inEvent,
AudioUnitCarbonViewEventID inEvent,
const void *inEventParam)
{
// We're not actually using this yet...
@@ -794,7 +794,7 @@ AudioUnitDialog::AudioUnitDialog(wxWindow *parent, wxWindowID id,
mHandlerRef(NULL)
{
long style = wxDEFAULT_DIALOG_STYLE;
#if ((wxMAJOR_VERSION == 2) && (wxMINOR_VERSION <= 4))
wxDialog::Create(parent, id, title,
@@ -823,7 +823,7 @@ AudioUnitDialog::AudioUnitDialog(wxWindow *parent, wxWindowID id,
// way to disable compositing, so bypass it until a way
// is found.
#if !wxCHECK_VERSION(2, 7, 0)
m_macUsesCompositing = false;
m_macUsesCompositing = false;
#endif
// Rest of wxTopLevelWindow::Create
@@ -831,7 +831,7 @@ AudioUnitDialog::AudioUnitDialog(wxWindow *parent, wxWindowID id,
m_windowId = id == -1 ? NewControlId() : id;
MacCreateRealWindow(title, wxDefaultPosition, wxSize(500, 400),
MacRemoveBordersFromStyle(style) , title) ;
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
wxTopLevelWindows.Append(this);
if ( parent )
parent->AddChild(this);
@@ -870,7 +870,7 @@ AudioUnitDialog::AudioUnitDialog(wxWindow *parent, wxWindowID id,
wxPoint(0, 0),
wxSize(width, height),
audioUnitControl);
// Eventually, to handle resizing controls, call:
// AudioUnitCarbonViewSetEventListener with the event:
// kEventControlBoundsChanged
@@ -883,7 +883,7 @@ AudioUnitDialog::AudioUnitDialog(wxWindow *parent, wxWindowID id,
mGUIControl = NULL;
wxBoxSizer *hSizer = new wxBoxSizer(wxHORIZONTAL);
wxButton *preview = new wxButton(this, PreviewID, _("Pre&view"));
hSizer->Add(preview, 0, wxALL, 10);

View File

@@ -27,19 +27,19 @@ class AudioUnitEffect:public Effect {
virtual ~AudioUnitEffect();
virtual wxString GetEffectName();
virtual std::set<wxString> GetEffectCategories();
virtual wxString GetEffectIdentifier();
virtual wxString GetEffectAction();
virtual bool Init();
virtual bool PromptUser();
virtual bool Process();
virtual void End();
private:
@@ -59,15 +59,15 @@ class AudioUnitEffect:public Effect {
bool CopyParameters(AudioUnit srcUnit, AudioUnit dstUnit);
static OSStatus
SimpleAudioRenderCallback(void *inRefCon,
SimpleAudioRenderCallback(void *inRefCon,
AudioUnitRenderActionFlags *inActionFlags,
const AudioTimeStamp *inTimeStamp,
const AudioTimeStamp *inTimeStamp,
UInt32 inBusNumber,
UInt32 inNumFrames,
UInt32 inNumFrames,
AudioBufferList *ioData);
Component GetCarbonViewComponent(OSType subtype);
wxString mName;
Component mComponent;
AudioUnit mUnit;

View File

@@ -18,13 +18,13 @@ void LoadAudioUnitsOfType(OSType inAUType)
{
ComponentDescription desc;
Component component;
desc.componentType = inAUType;
desc.componentSubType = 0;
desc.componentManufacturer = 0;
desc.componentFlags = 0;
desc.componentFlagsMask = 0;
component = FindNextComponent(NULL, &desc);
while (component != NULL) {
ComponentDescription found;