-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix breakage on Julia v0.4 related to ccall
The ccall function implementation was changed. It is stricter now. Use "¬hing" to indicate a NULL pointer.
- Loading branch information
1 parent
44bf337
commit 7ed82cb
Showing
1 changed file
with
5 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -175,7 +175,7 @@ function AudioQueueEnqueueBuffer(aq, bufPtr, data) | |
const result = ccall((:AudioQueueEnqueueBuffer, AudioToolbox), | ||
OSStatus, | ||
(AudioQueueRef, AudioQueueBufferRef, UInt32, Ptr{Void}), | ||
aq, bufPtr, 0, 0) | ||
aq, bufPtr, 0, ¬hing) | ||
if result != 0 | ||
error("AudioQueueEnqueueBuffer failed with $result") | ||
end | ||
|
@@ -259,7 +259,7 @@ function AudioQueueNewOutput(format::AudioStreamBasicDescription, userData::Audi | |
(Ptr{AudioQueueData}, AudioQueueRef, AudioQueueBufferRef)) | ||
const result = | ||
ccall((:AudioQueueNewOutput, AudioToolbox), OSStatus, | ||
(Ptr{AudioStreamBasicDescription}, Ptr{Void}, Ptr{Void}, CFRunLoopRef, CFStringRef, UInt32, Ptr{AudioQueueRef}), | ||
(Ptr{AudioStreamBasicDescription}, Ptr{Void}, Ptr{AudioQueueData}, CFRunLoopRef, CFStringRef, UInt32, Ptr{AudioQueueRef}), | ||
&format, cCallbackProc, &userData, runLoop, runLoopMode, 0, newAudioQueue) | ||
if result != 0 | ||
error("AudioQueueNewOutput failed with $result") | ||
|
@@ -288,8 +288,10 @@ end | |
# referenced to the sample frame timeline of the associated audio device. May be NULL. | ||
# @result An OSStatus result code. | ||
function AudioQueueStart(aq) | ||
# The second parameter of AudioQueueStart is "AudioTimeStamp," but I don't know how | ||
# to pass a "NULL" AudioTimeStamp pointer. | ||
const result = ccall((:AudioQueueStart, AudioToolbox), OSStatus, | ||
(AudioQueueRef, Ptr{AudioTimeStamp}), aq, 0) | ||
(AudioQueueRef, Ptr{Void}), aq, ¬hing) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
dancasimiro
Owner
|
||
if result != 0 | ||
error("AudioQueueStart failed with $result") | ||
end | ||
|
This doesn't seem right to me. If you want to pass a null pointer, shouldn't you pass
C_NULL
?