Re: Anyone using Portaudio?

2010-10-17 Thread Andrej Mitrovic
Nooo, I'm telling you there are Russian spies in the header files!! So is anyone else interested in DSP/Music software around here? I'm quite excited about using D for some audio programming.. On 10/18/10, Jonathan M Davis wrote: > On Sunday 17 October 2010 17:05:50 Andrej Mitrovic wrote: >> Pro

Re: Anyone using Portaudio?

2010-10-17 Thread Jonathan M Davis
On Sunday 17 October 2010 17:05:50 Andrej Mitrovic wrote: > Problem solved! > > The D header file for Portaudio was bugged, I'll update it in the > Bindings project. Bugged? Who was listening in on it? ;) I think that you meant to say that it was buggy or that it had a bug (or bugs) in it. - J

Re: Anyone using Portaudio?

2010-10-17 Thread Denis Koroskin
On Mon, 18 Oct 2010 04:16:10 +0400, Andrej Mitrovic wrote: Here's the update, I hope someone puts it in the repo: http://www.dsource.org/forums/viewtopic.php?p=25726#25726 IIRC, the repo is public, i.e. everyone has commit access. If so, you can commit the change yourself. Try it.

Re: Anyone using Portaudio?

2010-10-17 Thread Andrej Mitrovic
Here's the update, I hope someone puts it in the repo: http://www.dsource.org/forums/viewtopic.php?p=25726#25726 On 10/18/10, Andrej Mitrovic wrote: > Problem solved! > > The D header file for Portaudio was bugged, I'll update it in the > Bindings project. > > On 10/18/10, Andrej Mitrovic wrote

Re: Anyone using Portaudio?

2010-10-17 Thread Andrej Mitrovic
Problem solved! The D header file for Portaudio was bugged, I'll update it in the Bindings project. On 10/18/10, Andrej Mitrovic wrote: > This is interesting. It appears the callback function is not called > frequently enough. Really weird.. it must be some bug in my code. > > You see, I have a

Re: Anyone using Portaudio?

2010-10-17 Thread Andrej Mitrovic
This is interesting. It appears the callback function is not called frequently enough. Really weird.. it must be some bug in my code. You see, I have a sample rate of 44100hz per second, and a buffer size of 64. This basically means that for 1 second of audio I need to fill ~680buffers per second

Re: Operator precedence of "new"

2010-10-17 Thread bearophile
I was busy, I am back. Indeed it wasn't a good idea. Thank you for all the answers. Bye, bearophile

Re: Anyone using Portaudio?

2010-10-17 Thread Andrej Mitrovic
Yeah, that's what I would usually do. The trouble is there's a library in DLL format, and there's only a couple of calls to it and that's it. But somehow the C client code performs better. I've just tried a D1 sample, with the same result. I'll have to investigate.. On 10/17/10, Denis Koroskin <2k

Re: Anyone using Portaudio?

2010-10-17 Thread Denis Koroskin
On Mon, 18 Oct 2010 01:10:31 +0400, Andrej Mitrovic wrote: There's a .d header file in the Bindings project on dsource which I'm using with the Portaudio DLL v19, and I'm implicitly loading the DLL. There's a sine playback example, and I'm comparing the usage of Portaudio from the C sin

Anyone using Portaudio?

2010-10-17 Thread Andrej Mitrovic
There's a .d header file in the Bindings project on dsource which I'm using with the Portaudio DLL v19, and I'm implicitly loading the DLL. There's a sine playback example, and I'm comparing the usage of Portaudio from the C sine example (patest_sine.c) compared to the D one (patest_sine_hello.

implib crashing with .def files

2010-10-17 Thread Andrej Mitrovic
I don't know where else to post this. I downloaded implib with the "bup" package, I've found it on this NG (ftp://digitalmars.com/bup.zip). Anyway, implib works fine when I need to make an OMF import library out of a DLL made in e.g. Visual Studio. But it crashes if I specify the .def file in

Re: Question about typeof(*this)

2010-10-17 Thread Ivo Kasiuk
choi heejo wrote: > hi there, please read this code: > > > import std.stdio; > > > struct test(T) > { > alias typeof(*this) type; > T a; > } > > > > > void main() > { > test!(int).type t; > > t.a = 123; > > writeln(t.a); > } > > > I guessed it would work. but the compiler said: > > >

Question about typeof(*this)

2010-10-17 Thread choi heejo
hi there, please read this code: import std.stdio; struct test(T) { alias typeof(*this) type; T a; } void main() { test!(int).type t; t.a = 123; writeln(t.a); } I guessed it would work. but the compiler said: main.d(7): Error: can only * a pointer, not a 'test!(int)' main.d(14): Error: temp