some const_cast<> additions for OS X where gcc believes that volatile int* means const int*
This commit is contained in:
parent
8d8770f4cc
commit
2de09888b6
|
@ -404,9 +404,9 @@ MidiTracer::tracer (Parser&, byte* msg, size_t len)
|
|||
|
||||
fifo.write (&buf, 1);
|
||||
|
||||
if (g_atomic_int_get (&_update_queued) == 0) {
|
||||
if (g_atomic_int_get (const_cast<gint*> (&_update_queued)) == 0) {
|
||||
gui_context()->call_slot (invalidator (*this), boost::bind (&MidiTracer::update, this));
|
||||
g_atomic_int_inc (&_update_queued);
|
||||
g_atomic_int_inc (const_cast<gint*> (&_update_queued));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -414,7 +414,7 @@ void
|
|||
MidiTracer::update ()
|
||||
{
|
||||
bool updated = false;
|
||||
g_atomic_int_dec_and_test (&_update_queued);
|
||||
g_atomic_int_dec_and_test (const_cast<gint*> (&_update_queued));
|
||||
|
||||
RefPtr<TextBuffer> buf (text.get_buffer());
|
||||
|
||||
|
|
|
@ -202,8 +202,8 @@ MidiDiskstream::non_realtime_input_change ()
|
|||
seek (_session.transport_frame());
|
||||
}
|
||||
|
||||
g_atomic_int_set(&_frames_pending_write, 0);
|
||||
g_atomic_int_set(&_num_captured_loops, 0);
|
||||
g_atomic_int_set(const_cast<gint*> (&_frames_pending_write), 0);
|
||||
g_atomic_int_set(const_cast<gint*> (&_num_captured_loops), 0);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -376,8 +376,8 @@ MidiDiskstream::process (BufferSet& bufs, framepos_t transport_frame, pframes_t
|
|||
}
|
||||
_write_source->mark_write_starting_now(
|
||||
capture_start_frame, capture_captured, loop_length);
|
||||
g_atomic_int_set(&_frames_pending_write, 0);
|
||||
g_atomic_int_set(&_num_captured_loops, 0);
|
||||
g_atomic_int_set(const_cast<gint*> (&_frames_pending_write), 0);
|
||||
g_atomic_int_set(const_cast<gint*> (&_num_captured_loops), 0);
|
||||
was_recording = true;
|
||||
}
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ MidiDiskstream::process (BufferSet& bufs, framepos_t transport_frame, pframes_t
|
|||
break;
|
||||
}
|
||||
}
|
||||
g_atomic_int_add(&_frames_pending_write, nframes);
|
||||
g_atomic_int_add(const_cast<gint*> (&_frames_pending_write), nframes);
|
||||
|
||||
if (buf.size() != 0) {
|
||||
Glib::Threads::Mutex::Lock lm (_gui_feed_buffer_mutex, Glib::Threads::TRY_LOCK);
|
||||
|
@ -799,7 +799,7 @@ MidiDiskstream::do_flush (RunContext /*context*/, bool force_flush)
|
|||
return 0;
|
||||
}
|
||||
|
||||
const framecnt_t total = g_atomic_int_get(&_frames_pending_write);
|
||||
const framecnt_t total = g_atomic_int_get(const_cast<gint*> (&_frames_pending_write));
|
||||
|
||||
if (total == 0 ||
|
||||
_capture_buf->read_space() == 0 ||
|
||||
|
@ -834,7 +834,7 @@ MidiDiskstream::do_flush (RunContext /*context*/, bool force_flush)
|
|||
error << string_compose(_("MidiDiskstream %1: cannot write to disk"), id()) << endmsg;
|
||||
return -1;
|
||||
}
|
||||
g_atomic_int_add(&_frames_pending_write, -to_write);
|
||||
g_atomic_int_add(const_cast<gint*> (&_frames_pending_write), -to_write);
|
||||
}
|
||||
|
||||
out:
|
||||
|
@ -1044,7 +1044,7 @@ MidiDiskstream::transport_looped (framepos_t)
|
|||
the Source and/or entirely after the capture is finished.
|
||||
*/
|
||||
if (was_recording) {
|
||||
g_atomic_int_add(&_num_captured_loops, 1);
|
||||
g_atomic_int_add(const_cast<gint*> (&_num_captured_loops), 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -891,7 +891,7 @@ GType prolooks_hsl_get_type (void) {
|
|||
gpointer prolooks_hsl_ref (gpointer instance) {
|
||||
ProlooksHSL* self;
|
||||
self = instance;
|
||||
g_atomic_int_inc (&self->ref_count);
|
||||
g_atomic_int_inc (&self->ref_count);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue