changed NULLs to nullptr

This commit is contained in:
itsmattkc
2019-01-12 12:57:15 +11:00
parent 6da0f29e8c
commit a8e37ac76a
59 changed files with 785 additions and 785 deletions
+11 -11
View File
@@ -27,7 +27,7 @@ QIODevice* audio_io_device;
bool audio_device_set = false;
bool audio_scrub = false;
QMutex audio_write_lock;
QAudioInput* audio_input = NULL;
QAudioInput* audio_input = nullptr;
QFile output_recording;
bool recording = false;
@@ -36,7 +36,7 @@ int audio_ibuffer_read = 0;
long audio_ibuffer_frame = 0;
double audio_ibuffer_timecode = 0;
AudioSenderThread* audio_thread = NULL;
AudioSenderThread* audio_thread = nullptr;
bool is_audio_device_set() {
return audio_device_set;
@@ -60,7 +60,7 @@ void init_audio() {
dout << " " << devs.at(i).deviceName();
}
if (info.isNull() && devs.size() > 0) {
qWarning() << "Default audio returned NULL, attempting to use first device found...";
qWarning() << "Default audio returned nullptr, attempting to use first device found...";
info = devs.at(0);
}
qInfo() << "Using audio device" << info.deviceName();
@@ -76,8 +76,8 @@ void init_audio() {
// connect
audio_io_device = audio_output->start();
if (audio_io_device == NULL) {
qWarning() << "Received NULL audio device. No compatible audio output was found.";
if (audio_io_device == nullptr) {
qWarning() << "Received nullptr audio device. No compatible audio output was found.";
} else {
audio_device_set = true;
@@ -101,10 +101,10 @@ void stop_audio() {
}
void clear_audio_ibuffer() {
if (audio_thread != NULL) audio_thread->lock.lock();
if (audio_thread != nullptr) audio_thread->lock.lock();
memset(audio_ibuffer, 0, audio_ibuffer_size);
audio_ibuffer_read = 0;
if (audio_thread != NULL) audio_thread->lock.unlock();
if (audio_thread != nullptr) audio_thread->lock.unlock();
}
int current_audio_freq() {
@@ -169,14 +169,14 @@ int AudioSenderThread::send_audio_to_output(int offset, int max) {
// send samples to audio monitor cache
// TODO make this work for the footage viewer - currently, enabling it causes crash due to an ASSERT
Sequence* s = NULL;
Sequence* s = nullptr;
/*if (panel_footage_viewer->playing) {
s = panel_footage_viewer->seq;
}*/
if (panel_sequence_viewer->playing) {
s = panel_sequence_viewer->seq;
}
if (s != NULL) {
if (s != nullptr) {
if (panel_timeline->audio_monitor->sample_cache_offset == -1) {
panel_timeline->audio_monitor->sample_cache_offset = s->playhead;
}
@@ -287,7 +287,7 @@ void write_wave_trailer(QFile& f) {
}
bool start_recording() {
if (sequence == NULL) {
if (sequence == nullptr) {
qCritical() << "No active sequence to record into";
return false;
}
@@ -338,7 +338,7 @@ void stop_recording() {
output_recording.close();
delete audio_input;
audio_input = NULL;
audio_input = nullptr;
recording = false;
}
}