: Thanks a lot Jonathan,
:
: I have some more questions about what you wrote:
:
: 1. How do you suggest to overcome big file problem? I don't mind
: splitting the recordings into two or more parts (since the plan is
: to have the user access them only through my program), but how hard
: would the win32 api (or DirectX) make it for me?
:
Sorry if I was unclear - I was more talking about writing the files to disk at that point although if the Win32 API or DirectX uses some kind of offset from 0 in terms of bytes you'll hit some fun. There is a maximum file size limit of 2 GB of FAT32. NTFS should be able to handle bigger files. But the problems all start to appear once you hit quantities measured above the magic value of 2^32 - 1, or in some cases 2^31 - 1. Of course, if your encoding then the file size issue most likely won't plague you. Just think about stuff inside your program.
: 2. What exactly does DirectX require to be installed at the user's
: computer, and can my program install it for the user?
:
You just need to point them to the DirectX setup which they can get from the MS site. Or you can include it, if you're shipping the product on a CD. DirectX, as far as I'm aware, is included with the latest versions of Windows anyway. 2000 onwards at leats.
: 3. Is there a toolkit that does not require me to do the multi-
: threading manually? I don't have much experience with multi-tasking
: and I want to avoid unexpected time-consuming schedule-upsetting
: bugs.
:
Nope, I'm not too happy on the multi-threading front either. They say it's all OK until you start sharing data between threads. When you do that you have to start woryying about locking, and when you have to worry about locking you have to worry about race conditions, etc... You may be able to get away with it all - certainly you can use DirectX or Win32 API from VB and you literally can't use threading there.
: 4. Why do you recommend using a common or standard codec?
I'm of the opinion that open standards are the way to go. This is one of the biggest problems with interoperation with MS software - closed standards etc. You don't have to share my opinion, of course.
: Is it just so that people will be able to play the files via media
: player, etc., or on other computers?
This is certainly a big reason, yes.
: For me it is more important that the size of the files will be as
: small as possible without losing too much quality (since the program
: will probably be used to record and store a lot of audio), and of
: course to avoid paying royalties or whatever.
Well, OGG, MP3 and WMA are the most popular ones and they all offer good quality and compression (all taking no more than 1/10 of the amount of space for a wave file for equivalent quality). As for IP stuff, WMA is Microsoft's format, take from that what you will. MP3 has patent issues around it. OGG Vorbis, on the other hand, is open and patent issue free. It claims to be better than MP3 on the quality for a given file size. See:-
http://www.vorbis.com/
: The user will be able to access and play the files through my
: program, and if he wishes to use them in other contexts I don't mind
: converting them upon request. Does this change your recommendation?
I'd still like to be convinced that the codecs that are in popular use are a lot worse than the ones you're looking at. Given you want to be in the clear with loyalties etc, I would suggest you consider OGG, even if you don't finish up using it.
: 5. As to AMaMP, I'll be glad to make use of it when it has the
: features I need, but have almost no knowledge about audio
: programming so I don't think you would want me on the development
: team... (-;. In the meantime, I'll be happy to be pointed in the
: direction of examples of implementation or algorithms of echo and
: noise-reductions, etc.
:
I was thinking, just for interest (e.g. ignore this if you want), of how the AMaMP engine would provide for your needs (note that the things you'd need are far from being implemented). It'd be along the lines of:-
1) Invoke AMaMP, giving it an instruction file stating:-
An input from the soundcard by the SteamInput chunk
An Effect chunk for a noise gate, giving it parameters to provide notifications over IPC when it opens/closes.
A Placement chunk placed at the start of time with the input from the soundcard, no output and routing it via the noise gate effect.
2) In your app, wait for an AMaMP message to be recieved when the noise gate opens.
3) Send a message to the AMaMP engine to create an output and tell it to start routing data from the placement to that output.
4) Wait for the noise gate to close again, get the notification, and remove the output.
5) Back to 3.
Well, that'd be fairly neat to do, but sadly just too much of AMaMP is incomplete to even contemplate being able to do any of that just yet. Effects support should be started in the next month or so, but this is what I do in my free time and it's somewhat lacking right now.
Algorithm wise, the VB front end contains two classes of interest, one which implements a noise gate and the other which implements a multi-tap delay (echo). I would *not* recommend implementing these things in VB - other than the cross-platform capability AMaMP now has C allows me to give it high performance.
Jonathan
###
for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
(tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
/(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");