Bug 13584 – "not callable using argument types" despite perfect match

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-10-07T20:47:00Z
Last change time
2017-07-18T13:32:42Z
Assigned to
nobody
Creator
vlevenfeld

Comments

Comment #0 by vlevenfeld — 2014-10-07T20:47:01Z
Using the portaudio bindings, I get this message: -------------- source/pa_test.d(166): Error: function deimos.portaudio.Pa_OpenStream (void** stream, const(PaStreamParameters*) inputParameters, const(PaStreamParameters*) outputParameters, double sampleRate, uint framesPerBuffer, uint streamFlags, extern (C) int function(const(void)* input, void* output, uint frameCount, const(PaStreamCallbackTimeInfo)* timeInfo, uint statusFlags, void* userData) streamCallback, void* userData) is not callable using argument types (void**, const(PaStreamParameters*), const(PaStreamParameters*), double, uint, uint, extern (C) int function(const(void)* inputBuffer, void* outputBuffer, uint framesPerBuffer, const(PaStreamCallbackTimeInfo)* timeInfo, uint statusFlags, void* userData), void*) --------------- The argument types passed are identical to the argument types required. Here is the main method: void main () {/*...}*/ PaStreamParameters inputP, outputP; PaStream* stream; PaError err = paNoError; err = Pa_Initialize; assert (err == paNoError); inputP.device = Pa_GetDefaultInputDevice; assert (inputP.device != paNoDevice); with (inputP) {/*...}*/ channelCount = 1; sampleFormat = paFloat32; suggestedLatency = Pa_GetDeviceInfo (device).defaultLowInputLatency; } enum sampleRate = 44100.0; enum recTime = 10; float[sampleRate.to!size_t * recTime] data; err = Pa_OpenStream (&stream, cast(const(PaStreamParameters*))&inputP, cast(const(PaStreamParameters*))null, 44100.0, paFramesPerBufferUnspecified.to!uint, paClipOff, &record, cast(void*)data.ptr ); assert (err == paNoError); Pa_StartStream (stream); foreach (i; 0..100) {/*...}*/ Pa_Sleep (100); writeln (maxed*50); } Pa_StopStream (stream); Pa_Terminate; }
Comment #1 by k.hara.pg — 2015-09-03T07:18:23Z
The test case is incomplete. In here err = Pa_OpenStream (&stream, cast(const(PaStreamParameters*))&inputP, cast(const(PaStreamParameters*))null, 44100.0, paFramesPerBufferUnspecified.to!uint, paClipOff, &record, cast(void*)data.ptr ); the 'record' is unknown identifier, so I cannot see what's the problem. Downgrade importance to normal.
Comment #2 by dlang-bugzilla — 2017-07-18T13:32:42Z
I couldn't reproduce this issue, as reported. Closing, as this was reported in 2014 and has had no activity since 2015; if you can provide a reproducible test case, please reopen.