Audacity  2.2.2
Invert.cpp
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  Invert.cpp
6 
7  Mark Phillips
8 
9 
10 *******************************************************************//*******************************************************************/
16 
17 #include "../Audacity.h"
18 
19 #include <wx/intl.h>
20 
21 #include "Invert.h"
22 
24 {
25 }
26 
28 {
29 }
30 
31 // IdentInterface implementation
32 
34 {
35  return INVERT_PLUGIN_SYMBOL;
36 }
37 
39 {
40  return _("Flips the audio samples upside-down, reversing their polarity");
41 }
42 
43 // EffectIdentInterface implementation
44 
46 {
47  return EffectTypeProcess;
48 }
49 
51 {
52  return false;
53 }
54 
55 // EffectClientInterface implementation
56 
58 {
59  return 1;
60 }
61 
63 {
64  return 1;
65 }
66 
67 size_t EffectInvert::ProcessBlock(float **inBlock, float **outBlock, size_t blockLen)
68 {
69  float *ibuf = inBlock[0];
70  float *obuf = outBlock[0];
71 
72  for (decltype(blockLen) i = 0; i < blockLen; i++)
73  {
74  obuf[i] = -ibuf[i];
75  }
76 
77  return blockLen;
78 }
#define INVERT_PLUGIN_SYMBOL
Definition: Invert.h:20
unsigned GetAudioOutCount() override
Definition: Invert.cpp:62
size_t ProcessBlock(float **inBlock, float **outBlock, size_t blockLen) override
Definition: Invert.cpp:67
unsigned GetAudioInCount() override
Definition: Invert.cpp:57
wxString GetSymbol() override
Definition: Invert.cpp:33
EffectType GetType() override
Definition: Invert.cpp:45
wxString GetDescription() override
Definition: Invert.cpp:38
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom"))), OnMoveTrack) void TrackMenuTable::OnSetName(wxCommandEvent &)
bool IsInteractive() override
Definition: Invert.cpp:50
EffectInvert()
Definition: Invert.cpp:23
virtual ~EffectInvert()
Definition: Invert.cpp:27