1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-26 22:51:21 +01:00

Remove whitespace only changes

Signed-off-by: Emily Mabrey <emabrey@tenacityaudio.org>
This commit is contained in:
Emily Mabrey
2021-08-10 18:49:56 -04:00
parent d4a560f6f3
commit d7695f3c91
3 changed files with 92 additions and 91 deletions

View File

@@ -986,8 +986,7 @@ AudioIO::AudioIO()
#ifdef EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT
mAILAActive = false;
#endif
mStreamToken = 0;
mStreamToken = 0;
mLastPaError = paNoError;
@@ -1004,18 +1003,18 @@ AudioIO::AudioIO()
PaError err = Pa_Initialize();
if (err != paNoError) {
auto errStr = XO("Could not find any audio devices.\n");
errStr += XO("You will not be able to play or record audio.\n\n");
const wxString paErrStr = LAT1CTOWX(Pa_GetErrorText(err));
if (!paErrStr.empty())
errStr += XO("Error: %s").Format(paErrStr);
// XXX: we are in libaudacity, popping up dialogs not allowed! A
// long-term solution will probably involve exceptions
AudacityMessageBox(
errStr,
XO("Error Initializing Audio"),
wxICON_ERROR | wxOK);
if (err != paNoError) {
auto errStr = XO("Could not find any audio devices.\n");
errStr += XO("You will not be able to play or record audio.\n\n");
const wxString paErrStr = LAT1CTOWX(Pa_GetErrorText(err));
if (!paErrStr.empty())
errStr += XO("Error: %s").Format(paErrStr);
// XXX: we are in libaudacity, popping up dialogs not allowed! A
// long-term solution will probably involve exceptions
AudacityMessageBox(
errStr,
XO("Error Initializing Audio"),
wxICON_ERROR|wxOK);
// Since PortAudio is not initialized, all calls to PortAudio
// functions will fail. This will give reasonable behavior, since
@@ -1026,19 +1025,19 @@ AudioIO::AudioIO()
#ifdef EXPERIMENTAL_MIDI_OUT
PmError pmErr = Pm_Initialize();
if (pmErr != pmNoError) {
auto errStr =
XO("There was an error initializing the midi i/o layer.\n");
errStr += XO("You will not be able to play midi.\n\n");
const wxString pmErrStr = LAT1CTOWX(Pm_GetErrorText(pmErr));
if (!pmErrStr.empty())
errStr += XO("Error: %s").Format(pmErrStr);
// XXX: we are in libaudacity, popping up dialogs not allowed! A
// long-term solution will probably involve exceptions
AudacityMessageBox(
errStr,
XO("Error Initializing Midi"),
wxICON_ERROR | wxOK);
if (pmErr != pmNoError) {
auto errStr =
XO("There was an error initializing the midi i/o layer.\n");
errStr += XO("You will not be able to play midi.\n\n");
const wxString pmErrStr = LAT1CTOWX(Pm_GetErrorText(pmErr));
if (!pmErrStr.empty())
errStr += XO("Error: %s").Format(pmErrStr);
// XXX: we are in libaudacity, popping up dialogs not allowed! A
// long-term solution will probably involve exceptions
AudacityMessageBox(
errStr,
XO("Error Initializing Midi"),
wxICON_ERROR|wxOK);
// Same logic for PortMidi as described above for PortAudio
}

View File

@@ -11,6 +11,9 @@ Paul Licameli split from AudioIO.h
#ifndef __AUDACITY_AUDIO_IO_BASE__
#define __AUDACITY_AUDIO_IO_BASE__
#include <cfloat>
#include <functional>
#include <vector>
@@ -35,7 +38,7 @@ class BoundedEnvelope;
// Windows build needs complete type for parameter of wxWeakRef
// class MeterPanelBase;
#include "widgets/MeterPanelBase.h"
using PRCrossfadeData = std::vector< std::vector<float>>;
using PRCrossfadeData = std::vector< std::vector < float > >;
#define BAD_STREAM_TIME (-DBL_MAX)

View File

@@ -10,35 +10,34 @@ class AudioIOBufferHelper
private:
unsigned int numPlaybackChannels;
unsigned long framesPerBuffer;
unsigned int numPlaybackChannels;
unsigned long framesPerBuffer;
public:
WaveTrack** chans;
float** tempBufs;
WaveTrack** chans;
float** tempBufs;
AudioIOBufferHelper(const unsigned int numPlaybackChannels, const unsigned long framesPerBuffer) {
this->numPlaybackChannels = numPlaybackChannels;
this->framesPerBuffer = framesPerBuffer;
AudioIOBufferHelper(const unsigned int numPlaybackChannels, const unsigned long framesPerBuffer) {
this->numPlaybackChannels = numPlaybackChannels;
this->framesPerBuffer = framesPerBuffer;
this->chans = safenew WaveTrack * [numPlaybackChannels];
this->tempBufs = safenew float* [numPlaybackChannels];
this->chans = safenew WaveTrack * [numPlaybackChannels];
this->tempBufs = safenew float* [numPlaybackChannels];
tempBufs[0] = safenew float[(size_t)numPlaybackChannels * framesPerBuffer];
memset(tempBufs[0], 0, (size_t)numPlaybackChannels * (size_t)framesPerBuffer * sizeof(float));
tempBufs[0] = safenew float[(size_t)numPlaybackChannels * framesPerBuffer];
memset(tempBufs[0], 0, (size_t)numPlaybackChannels * (size_t)framesPerBuffer * sizeof(float));
for (unsigned int c = 1; c < numPlaybackChannels; c++) {
tempBufs[c] = tempBufs[c - 1] + framesPerBuffer;
}
}
for (unsigned int c = 1; c < numPlaybackChannels; c++) {
tempBufs[c] = tempBufs[c - 1] + framesPerBuffer;
}
}
~AudioIOBufferHelper() {
delete[] tempBufs[0];
delete[] tempBufs;
delete[] chans;
}
~AudioIOBufferHelper() {
delete[] tempBufs[0];
delete[] tempBufs;
delete[] chans;
}
};
#endif