mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-27 06:07:59 +02:00
Remove whitespace only changes
Signed-off-by: Emily Mabrey <emabrey@tenacityaudio.org>
This commit is contained in:
parent
d4a560f6f3
commit
d7695f3c91
@ -986,8 +986,7 @@ AudioIO::AudioIO()
|
|||||||
#ifdef EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT
|
#ifdef EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT
|
||||||
mAILAActive = false;
|
mAILAActive = false;
|
||||||
#endif
|
#endif
|
||||||
|
mStreamToken = 0;
|
||||||
mStreamToken = 0;
|
|
||||||
|
|
||||||
mLastPaError = paNoError;
|
mLastPaError = paNoError;
|
||||||
|
|
||||||
@ -1004,18 +1003,18 @@ AudioIO::AudioIO()
|
|||||||
|
|
||||||
PaError err = Pa_Initialize();
|
PaError err = Pa_Initialize();
|
||||||
|
|
||||||
if (err != paNoError) {
|
if (err != paNoError) {
|
||||||
auto errStr = XO("Could not find any audio devices.\n");
|
auto errStr = XO("Could not find any audio devices.\n");
|
||||||
errStr += XO("You will not be able to play or record audio.\n\n");
|
errStr += XO("You will not be able to play or record audio.\n\n");
|
||||||
const wxString paErrStr = LAT1CTOWX(Pa_GetErrorText(err));
|
const wxString paErrStr = LAT1CTOWX(Pa_GetErrorText(err));
|
||||||
if (!paErrStr.empty())
|
if (!paErrStr.empty())
|
||||||
errStr += XO("Error: %s").Format(paErrStr);
|
errStr += XO("Error: %s").Format(paErrStr);
|
||||||
// XXX: we are in libaudacity, popping up dialogs not allowed! A
|
// XXX: we are in libaudacity, popping up dialogs not allowed! A
|
||||||
// long-term solution will probably involve exceptions
|
// long-term solution will probably involve exceptions
|
||||||
AudacityMessageBox(
|
AudacityMessageBox(
|
||||||
errStr,
|
errStr,
|
||||||
XO("Error Initializing Audio"),
|
XO("Error Initializing Audio"),
|
||||||
wxICON_ERROR | wxOK);
|
wxICON_ERROR|wxOK);
|
||||||
|
|
||||||
// Since PortAudio is not initialized, all calls to PortAudio
|
// Since PortAudio is not initialized, all calls to PortAudio
|
||||||
// functions will fail. This will give reasonable behavior, since
|
// functions will fail. This will give reasonable behavior, since
|
||||||
@ -1026,19 +1025,19 @@ AudioIO::AudioIO()
|
|||||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||||
PmError pmErr = Pm_Initialize();
|
PmError pmErr = Pm_Initialize();
|
||||||
|
|
||||||
if (pmErr != pmNoError) {
|
if (pmErr != pmNoError) {
|
||||||
auto errStr =
|
auto errStr =
|
||||||
XO("There was an error initializing the midi i/o layer.\n");
|
XO("There was an error initializing the midi i/o layer.\n");
|
||||||
errStr += XO("You will not be able to play midi.\n\n");
|
errStr += XO("You will not be able to play midi.\n\n");
|
||||||
const wxString pmErrStr = LAT1CTOWX(Pm_GetErrorText(pmErr));
|
const wxString pmErrStr = LAT1CTOWX(Pm_GetErrorText(pmErr));
|
||||||
if (!pmErrStr.empty())
|
if (!pmErrStr.empty())
|
||||||
errStr += XO("Error: %s").Format(pmErrStr);
|
errStr += XO("Error: %s").Format(pmErrStr);
|
||||||
// XXX: we are in libaudacity, popping up dialogs not allowed! A
|
// XXX: we are in libaudacity, popping up dialogs not allowed! A
|
||||||
// long-term solution will probably involve exceptions
|
// long-term solution will probably involve exceptions
|
||||||
AudacityMessageBox(
|
AudacityMessageBox(
|
||||||
errStr,
|
errStr,
|
||||||
XO("Error Initializing Midi"),
|
XO("Error Initializing Midi"),
|
||||||
wxICON_ERROR | wxOK);
|
wxICON_ERROR|wxOK);
|
||||||
|
|
||||||
// Same logic for PortMidi as described above for PortAudio
|
// Same logic for PortMidi as described above for PortAudio
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,9 @@ Paul Licameli split from AudioIO.h
|
|||||||
#ifndef __AUDACITY_AUDIO_IO_BASE__
|
#ifndef __AUDACITY_AUDIO_IO_BASE__
|
||||||
#define __AUDACITY_AUDIO_IO_BASE__
|
#define __AUDACITY_AUDIO_IO_BASE__
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <cfloat>
|
#include <cfloat>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -35,7 +38,7 @@ class BoundedEnvelope;
|
|||||||
// Windows build needs complete type for parameter of wxWeakRef
|
// Windows build needs complete type for parameter of wxWeakRef
|
||||||
// class MeterPanelBase;
|
// class MeterPanelBase;
|
||||||
#include "widgets/MeterPanelBase.h"
|
#include "widgets/MeterPanelBase.h"
|
||||||
using PRCrossfadeData = std::vector< std::vector<float>>;
|
using PRCrossfadeData = std::vector< std::vector < float > >;
|
||||||
|
|
||||||
#define BAD_STREAM_TIME (-DBL_MAX)
|
#define BAD_STREAM_TIME (-DBL_MAX)
|
||||||
|
|
||||||
|
@ -10,35 +10,34 @@ class AudioIOBufferHelper
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
unsigned int numPlaybackChannels;
|
unsigned int numPlaybackChannels;
|
||||||
unsigned long framesPerBuffer;
|
unsigned long framesPerBuffer;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
WaveTrack** chans;
|
WaveTrack** chans;
|
||||||
float** tempBufs;
|
float** tempBufs;
|
||||||
|
|
||||||
AudioIOBufferHelper(const unsigned int numPlaybackChannels, const unsigned long framesPerBuffer) {
|
AudioIOBufferHelper(const unsigned int numPlaybackChannels, const unsigned long framesPerBuffer) {
|
||||||
this->numPlaybackChannels = numPlaybackChannels;
|
this->numPlaybackChannels = numPlaybackChannels;
|
||||||
this->framesPerBuffer = framesPerBuffer;
|
this->framesPerBuffer = framesPerBuffer;
|
||||||
|
|
||||||
this->chans = safenew WaveTrack * [numPlaybackChannels];
|
this->chans = safenew WaveTrack * [numPlaybackChannels];
|
||||||
this->tempBufs = safenew float* [numPlaybackChannels];
|
this->tempBufs = safenew float* [numPlaybackChannels];
|
||||||
|
|
||||||
|
|
||||||
tempBufs[0] = safenew float[(size_t)numPlaybackChannels * framesPerBuffer];
|
tempBufs[0] = safenew float[(size_t)numPlaybackChannels * framesPerBuffer];
|
||||||
memset(tempBufs[0], 0, (size_t)numPlaybackChannels * (size_t)framesPerBuffer * sizeof(float));
|
memset(tempBufs[0], 0, (size_t)numPlaybackChannels * (size_t)framesPerBuffer * sizeof(float));
|
||||||
|
|
||||||
for (unsigned int c = 1; c < numPlaybackChannels; c++) {
|
for (unsigned int c = 1; c < numPlaybackChannels; c++) {
|
||||||
tempBufs[c] = tempBufs[c - 1] + framesPerBuffer;
|
tempBufs[c] = tempBufs[c - 1] + framesPerBuffer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
~AudioIOBufferHelper() {
|
~AudioIOBufferHelper() {
|
||||||
|
delete[] tempBufs[0];
|
||||||
delete[] tempBufs[0];
|
delete[] tempBufs;
|
||||||
delete[] tempBufs;
|
delete[] chans;
|
||||||
delete[] chans;
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user