Audio has not been the focus of my work, and nor will it ever be.
You sound like you need a vacation.


Weak, Homer... very weak.
You don't seem to take responsibility for your actions whatsoever. You don't even admit when you're wrong. You just avoid the issue and dish out personal jabs.
As I already said, it's not about audio being the main focus, or whether or not you use OpenAL or XP or anything. It's about the attitude you have.
Posted on 2009-12-23 02:30:11 by Scali
You're being very judgemental and launching a thinly veiled and quite personal attack apon me.
I'm not sure what you base this on.

OK, let me be quite clear.
I've been working on a game engine, BY MYSELF, for just on 4 years.
In between then and now, Microsoft have decided to release not one, but two new operating systems, each of which offers LESS in terms of hardware access than the previous one.

The only mistake I have made is to believe that DirectSound would remain a permanent part of DirectX, that Microsoft would not be so unprofessional as to break backward compatibility on such a critical and key feature, meanwhile concentrating on what is most important to me - eyecandy and intelligence.

I am sure as s*** not going to fork out 6000 dollars for a license to use FMOD, which I see as a complete ripoff of SoundTracker/SIDTracker technology which dates back to the c64!!!

I'm yet to see you produce anything other than implementations of existing tutorial sourcecode, none of your demos I've seen contained any audio content at all.
Please read the forum rules once more, and try to act like an adult.
Posted on 2009-12-23 02:51:32 by Homer

You're being very judgemental and launching a thinly veiled and quite personal attack apon me.
I'm not sure what you base this on.


So you think that pointing out someone's responsibilities and misconceptions is a personal attack...


OK, let me be quite clear.
I've been working on a game engine, BY MYSELF, for just on 4 years.
In between then and now, Microsoft have decided to release not one, but two new operating systems, each of which offers LESS in terms of hardware access than the previous one.


We'll all in the same boat here.
And again, it's not the OS that offers less in terms of hardware access. It's just DirectSound where the hardware acceleration feature is dropped.
That's just the life of a developer... Now I don't know how long you've been programming in general, but I can give a short list of some of the differences I've gone through (limiting myself to PC now, I've also used C64, Amiga, Java and probably some other stuff that I can't even remember), as I've been playing with graphics on PC since the early 90s:
- DOS
- Win16
- Win32
- GDI graphics framework
- WinG graphics framework
- DirectDraw graphics framework
- Direct3D 6 (hardware acceleration, software T&L)
- Direct3D 7 (hardware T&L, considerable API changes)
- Direct3D 8 (shaders, more considerable API changes)
- Direct3D 9 (more shaders, more API changes)
- Direct3D 10 (yet more shaders, MAJOR API changes)
- Direct3D 11 (yet more shaders)
- OpenGL
- WinMM audio
- ASIO
- DirectSound
- FMOD
- Cuda
- DirectCompute
- OpenCL

Yes, I have rewritten my 3D engines many times. Sometimes it was just a few hours of search & replace, sometimes it required completely rewriting the engine and re-thinking even the most basic logic.
The world of computing is in constant motion. Especially DirectX, which is refreshed every few years, to meet the requirements of the latest hardware.
It's just a fact of life. I have long accepted that fact.

The only mistake I have made is to believe that DirectSound would remain a permanent part of DirectX, that Microsoft would not be so unprofessional as to break backward compatibility on such a critical and key feature, meanwhile concentrating on what is most important to me - eyecandy and intelligence.


Dropping some backward compatibility is the best thing Microsoft has done in ages. PCs are one giant mess of legacy hardware and software. It's about time that the old crud is stripped, and newer, cleaner, more advanced solutions take their place.

I am sure as s*** not going to fork out 6000 dollars for a license to use FMOD, which I see as a complete ripoff of SoundTracker/SIDTracker technology which dates back to the c64!!!


Firstly, again you are ridiculously misinformed. Yes, FMOD started out as a modplayer, a long time ago (which was a good thing on early hardware). But it can do so much more now (hardware-accelerated 3D effects, mp3/ogg/etc support, abstraction of various different APIs on PC (DSound, A3D, OpenAL) and other platforms). Many big game titles use FMOD.
Secondly, FMOD is free for non-commercial use.

I'm yet to see you produce anything other than implementations of existing tutorial sourcecode, none of your demos I've seen contained any audio content at all.
Please read the forum rules once more, and try to act like an adult.


Existing tutorial sourcecode.... yea right. If there's anything I can say about my graphics work, it's that everything is designed and implemented by myself. The Java stuff is the most obvious example, as nothing 3D-related existed for Java at the time I wrote it. There surely weren't any tutorials that I could copy from. I wrote everything from the basic 2D framebuffer components to the math libraries and ofcourse the software renderer itself, and the engine that sits on top of it. I even implemented my own XML reader. The only thing I didn't code myself is the .ogg decoder, I used JOrbis for that.
The Direct3D and OpenGL engines are also not based on any existing code, but are again completely my own design and implementation.
The irony is that I've rarely actually used any tutorials. In the 90s and early 2000s I was a reasonably active demoscener, and discussed a lot of 3d stuff with other demosceners/game developers. One guy I've learnt a lot from, especially regarding hardware acceleration/D3D, is Kalsu from Mellow Chips/MatureFurk. He is the lead programmer of FutureMark.
Get a grip mate.

And no, I haven't released a lot of stuff with audio, but that's not the point, is it?
But if you must see it, I did make a demo that uses FMOD a few years ago:
http://bohemiq.scali.eu.org/forum/viewtopic.php?f=4&t=39
It uses FMOD to play back the audio, and an FFT spectrum analysis is performed, which is then used to drive various effect parameters in realtime (eg the amount of blur in horizontal and vertical direction, and the 'scanline' effect). It was a thing I was working on at the time, trying to get effects synced to the music automatically, rather than having to script them manually.
So yes, my 3d engine does indeed have an audio component.
(Obviously my Java demos both had an audio component aswell).

Now, where can I see any demos of yours? I've never seen you even post a screenshot, let alone a binary (there might have been some in older threads, but they were removed by the time I read them).

Also, do I need to remind you that a lot of the COM/DirectX stuff you are using now started with a tutorial and example include file and macros written by Ewald and myself (Scali is short for X-Calibre) for DirectDraw? Search for dc-ddraw.zip, it's also included with MASM32.
Here's the tutorial, written by me: http://www.codebreakers-journal.com/content/view/183/27/
To my knowledge it is the first ever tutorial explaining how DirectX COM objects work at the assembly level, and how to write some basic macros and typedefs to get some kind of OOP in ASM going. At any rate, Ewald and I sat in the university labroom with a disassembler, spitting through disassemblies of our C-code when writing this tutorial and the accompanying include file and plasma demo example.
Posted on 2009-12-23 06:41:30 by Scali
You're being very judgemental and launching a thinly veiled and quite personal attack apon me.
Oh, don't take it personally - that's just how Scali is sometimes :)
Posted on 2009-12-23 07:26:34 by f0dder

You're being very judgemental and launching a thinly veiled and quite personal attack apon me.
Oh, don't take it personally - that's just how Scali is sometimes :)


Seems like Homer is just getting a bit insecure and defensive... we've seen it before... you know who I mean, right, f0dder?
Posted on 2009-12-23 07:46:44 by Scali
Very entertaining, and semi-informative twist to this thread.

(For everyone too lazy to read the last couple pages... a summary)
- Scali believes Homer has chosen the wrong sound technology for his game engine and is stubbornly defending his choice.
- Home believes Scali's continued repudiations/rejoinders about how he performs his "hobby programming" constitutes a personal attack.
- Also, there's some informative stuff about 3D sound technology thrown in.
- And of course, being the Internet, there's a healthy dose of sizeof(e_Penis) posturing.

These threads make re-writing 50,000 lines of 10 y/o ASP and IE5 JavaScript bearable, please continue.
Posted on 2009-12-23 08:37:19 by r22

- Scali believes Homer has chosen the wrong sound technology for his game engine and is stubbornly defending his choice.


Incorrect.
I think the arguments that Homer used to defend his choice are weak, based mostly on misinformation and prejudice (eg "XP has an 80% marketshare" or "OpenAL isn't supported on Vista/Win7/64-bit and has lots of issues").
OpenAL is not 'my choice'. As I said, I currently don't support OpenAL at all. So I'm in the same boat as Homer.
The difference is that I've kept my eyes open when 64-bit and new versions of Windows arrived, and I have known about the DirectSound limitations from day 1. I have also looked into possible alternatives, but as it isn't a high priority for me, I haven't changed my code yet.
I've even said that I don't consider software DirectSound much of a problem. The performance impact is negligible.
If anything, it's Homer himself who thought he'd chosen the wrong API, as he was looking for hardware accelerated audio, and found out that DirectSound no longer does this on Vista/Win7.

Homer is just a very slippery fellow. One moment he makes some bold statements, the next he doesn't respond for days, or just evades the actual discussion altogether and just dishes out personal insults.
If you believe your decisions are the right ones, then stand up for what you believe in, I can respect that.
From my experience with many different APIs and platforms, targeting many different situations, I know that there is more than one way to skin a cat, so I will be the last to claim that there is only one 'right' API for audio and the rest is 'wrong'.
However, if you make a choice, I do expect you to give some logical arguments as to why you think it is 'right' for your particular situation. I also expect you to check your facts.
Posted on 2009-12-23 08:49:12 by Scali
I'm so sorry I don't live up to your expectations!
Please ignore the sarcasm in that statement.

You're right on many levels, but you miss the bigger picture.

Yes, I dropped the ball with respect to audio under windows - its not, and never will be a priority, I figured it will always be pretty easy to access audio on a computer, under any OS, how wrong was I?
DirectSound software wrapper is totally broken for capture support under vista64 and all Win7 builds - if you query for a DirectSound capture interface, it will hang that thread forever. Capture support isn't generally considered useful for gaming, but I wrote a whole SAPI interface to allow my games to take voice commands, and thats all trashed now.
Similarly, the ACM has been demolished, and so we're stuck with DSP filters, which of course need to be rewritten and rebuilt for the newer OS builds... so unless I use our COM plugin infrastructure to access mediaplayer components, I'm pretty much screwed.

Your suggestions in regards to OpenAL are spot on, its looking like the answer to my prayers - I am interested in commercial applications, so FMOD without a license is no use to me.

Audio is about 2 percent of my game engine, and perhaps I ignored it for too long.
But I have been keeping up in all other areas, the other 98 percent of my engine is quite respectable.
My physics engine for example, is almost twice as fast as the Bullet engine, which is well known for its speed.
The application framework itself is a bit of a mess, perhaps Biterider will be interested in helping to tidy that in the new year.

Yes, I am prejudiced... but I am also caged, and I have to work within the system, not against it.
However, that doesn't mean I need to rely on a bunch of external code to get my engine on the market.
So far, this audio stuff has been the one and only major stumbling block, now get this, if I had dealt with this issue 4 years ago, it would STILL be broken today, and if I spent the time in between working on audio, nothing else would have moved forward, so all said and done, I really don't care a whole lot, as long as it works.

I've appreciated your input, and I continue to, but do not make value judgements about me based apon something that some company did while I was working on something else, that's really not fair, is it?
Posted on 2009-12-23 09:51:50 by Homer
Yes, I dropped the ball with respect to audio under windows - its not, and never will be a priority, I figured it will always be pretty easy to access audio on a computer, under any OS, how wrong was I?


Once bitten, twice shy?

I am interested in commercial applications, so FMOD without a license is no use to me.


It would be interesting to get some kind of 'mission statement' on your engine.
So far I could only go by what f0dder told me, that it was a hobby project of yours.
I'd like to see a list of requirements/specs/roadmap... to get an idea of where you want to go with this. It would help put things in the right perspective.

do not make value judgements about me based apon something that some company did while I was working on something else, that's really not fair, is it?


As I already tried to explain in my previous post, it's quite naive to think that software and hardware won't change over the course of a few years (I consider all my DirectX code 'disposable').
Perhaps we must all learn this the hard way... But I hope the experience was an eye-opener for you, and that you'll be a bit more pro-active in the future. Microsoft has a lot of documentation on Vista and Win7, a lot of it being available long before launch. Likewise, download the latest DX SDK everytime one is released. The least you can do is browse through the docs a bit, there's always a topic on what's new and what's changed etc.
You now KNOW that these things can happen, so you EXPECT them, and see them coming in the future, I hope.
I would also suggest to sign up for a free beta the next time Microsoft does a Windows release. It's valuable experience.
Posted on 2009-12-23 11:28:24 by Scali

You don't seem to take responsibility for your actions whatsoever. You don't even admit when you're wrong. You just avoid the issue and dish out personal jabs.


Homer is an ASM hobbyist, and won't be on the fore of every front out there.

Thinking that software and/or hardware won't change is naive. However, thinking that API's won't break is not naive, it's an expectation unless it's been 10 years since or so since the last revision. Also, breaking API's is merely a sign of a bad design that becomes very discouraging for developers to deal with.

As for Vista, it always has and will be a steaming pile of s*** that no one in their right mind should model anything after, drivers be damned, so I don't blame anyone for ignoring it altogether. It is common knowledge that you don't even touch a Microsoft product until after the first revision or Service Pack, and there's a very valid reason for that.

Now that Windows 7 is out, and is proving to be stable and a worthy successor, it is now actually worth the effort for a hobbyist to make the plunge ($$$) from XP to 64-bit land.

Also, your comparison between Homer defending himself and the way hutch responded to these kind of situations is understandable. However, you're missing a key point in that Homer has not bothered to attack you at all or make you look bad in front of everyone else for simply disagreeing with him. He hasn't called you a virus writer or a snot-nosed punk who's wet behind the ears. He hasn't retaliated in ALA with some child-like attack. He hasn't rejected your statements due to arrogance; in fact he directly acknowledged and thus actually validated them. BUT, and this is the entire point so please pay close attention, he simply wants you to respect his decisions/choices and either help in a reasonable fashion... or simply leave him and *his* thread alone.

In short, Scali, you are starting to come off as an elitist a****** in this thread, and you need to throttle your enthusiasm back a bit... respect the rest of us that are stuck in the gray-scale trenches of life.
Posted on 2009-12-23 15:12:38 by SpooK
As for Vista, it always has and will be a steaming pile of s*** that no one in their right mind should model anything after, drivers be damned,
While Vista (especially Pre-SP1) had a bunch of problems, this statement is a bit too harsh - UAC was a good move (even though there's problems with it, mostly related to lack of decent APIs for us programmers) and moving graphics drivers to usermode was a very good idea - I haven't had a single BSOD on my Vista or Win7 installs (except for a too heavy overclock, but that doesn't count imho). While I'm not a fan of the looks of Aero, it's acceleration is a nice thing as well.

It is common knowledge that you don't even touch a Microsoft product until after the first revision or Service Pack, and there's a very valid reason for that.
Somewhat folklore, imho. Win7 has run fine since RC (and probably before), iirc XP was just fine before SP1 as well (as long as you didn't run directly exposed to the internet).

Apart from that, I agree with the rest - which is the important part, anyway.
Posted on 2009-12-23 17:43:52 by f0dder
Moving right along, I've been working on asynchronous file io under iocp.

IOCP are not just for socket connections.
I've already implemented a unified solution for all five socket types implemented under Windows OS, however, iocp can handle any kind of io handle - files, named pipes, shared memory objects, anything that is handled by the io subsystem, and which involves a handle, would be worth a try.

So now we'll have asynchronous read/write filestreaming (or random access if we wish) with a notification scheme to alert us that data is ready, or exhausted, should be a useful addition to the ObjAsm toolset.
Won't hurt my game engine either :)




Posted on 2009-12-24 02:10:06 by Homer

Homer is an ASM hobbyist, and won't be on the fore of every front out there.


Same goes for me.
I was just saying that you should take the responsibility for that. Don't hide behind "XP is still 80% of the market and Vista sucks anyway", just be honest and say "I'm a hobbyist and I don't have the resources to keep up-to-date with all major Windows changes". Like Vista or loathe it, it has always been clear that Vista would be reasonably popular from OEM preinstalls alone, and that Vista would be basis for future Windows OSes. Microsoft was never going to abandon Vista and resurrect XP. There was never any indication that the Vista-related compatibility problems would disappear with a future OS. So why wait for Windows 7? You might aswell fix them right away.
I don't get the hype around Windows 7 to be honest, as it has all the same major problems that Vista had (UAC, new driver model).

Thinking that software and/or hardware won't change is naive. However, thinking that API's won't break is not naive, it's an expectation unless it's been 10 years since or so since the last revision. Also, breaking API's is merely a sign of a bad design that becomes very discouraging for developers to deal with.


While I agree with that, I haven't verified Homer's claims myself, so I'm not entirely sure if Microsoft indeed broke DirectSound's capture functionality in Vista/Win7.
In my experience, Microsoft has always tried their best to keep backward compatibility, especially with DirectX. Ironically enough certain older stuff (< DX8) such as 3DMark99Max and 3DMark2000 no longer worked in XP on my machine. Imagine my surprise when I tried to run them in Vista x64 and they worked! With a completely new display driver model, that was custom-made for DirectX 10!

As for Vista, it always has and will be a steaming pile of s*** that no one in their right mind should model anything after, drivers be damned, so I don't blame anyone for ignoring it altogether. It is common knowledge that you don't even touch a Microsoft product until after the first revision or Service Pack, and there's a very valid reason for that.


Service Pack 1 was released almost 2 years ago now though (February 2008).
Personally I don't think developers should be in the habit of ignoring OSes. In fact, if OSes have a troublesome reputation I think it's all the more reason for a developer to check what his code will do on the platform. Because as I already said before, Windows will always get quite a few sales through OEM preinstallations, regardless of how good or bad a particular OS is.
And if you don't want to do that, just be honest about it and accept the responsibility.

Now that Windows 7 is out, and is proving to be stable and a worthy successor, it is now actually worth the effort for a hobbyist to make the plunge ($$$) from XP to 64-bit land.


As I said though, you don't need to spend any money, just get a free beta. That's what it's there for: for developers to test their software and hardware, and make modifications as required, so they are ready at release time (which sadly most vendors never are... a big reason why Vista had such a difficult start).
I don't expect you to run it as your main OS, but just having it installed and testing/debugging your code every now and then can prove quite valuable.

However, you're missing a key point in that Homer has not bothered to attack you at all or make you look bad in front of everyone else for simply disagreeing with him.


I think he did. I consider his remark that I would only have used "existing tutorial sourcecode" a huge insult (not to mention completely uncalled for, this was never a competition of who has the better skills), and I don't think I will ever forgive Homer for that. That's just how I am. Cross that line once, and you can't go back.

He hasn't rejected your statements due to arrogance;


He rejected it when I said that XP has only 50% marketshare among gamers, despite me citing Steam Survey as a source. He also rejected the advice to look into OpenAL (yes just to look into, nobody told him to actually use it, let alone that anyone pressured him into it in any way). I consider the reasons he gave 'arrogant' yes. Apparently because he thinks XP has 80% marketshare, even a cited reliable source is not accepted... and apparently his opinion on OpenAL is more important than that of both ti_mo_n and myself, who were merely trying to help him.

in fact he directly acknowledged and thus actually validated them.


He may have acknowledged OpenAL in the end (although I think he just said it to try and move on), but he never commented on XP marketshare and Vista/Win7/x64.

BUT, and this is the entire point so please pay close attention, he simply wants you to respect his decisions/choices and either help in a reasonable fashion... or simply leave him and *his* thread alone.


As I said before, I can respect decisions and choices, regardless of what they are, when there is solid reasoning behind them.
I tried to help him in a reasonable fashion, by suggesting to look into OpenAL for hardware-accelerated audio on Vista/Win7. I only entered this thread because he asked for advice, and I wanted to answer his question.
He became unreasonable first, with his questions of whether all those people reporting OpenAL problems were idiots, after ti_mo_n and I suggested to look into OpenAL.
That sort of thing doesn't go down well with me. Yes, my view of the world is that the majority of computer problems reported on the internet are of a PEBKAC nature. People ranting on about Vista/Win7/64-bit without ever having tried to use the OS themselves... Opinionated garbage and FUD everywhere. I'm fed up with that. It's bad enough that random gamers and power-users/enthusiasts spout this garbage on forums and newssites everywhere, but you'd think that assembly programmers would know better. If there is any group of people that should have a deeper insight in how CPUs and OSes work, it's assembly programmers... right?
Posted on 2009-12-24 02:14:54 by Scali

DirectSound software wrapper is totally broken for capture support under vista64 and all Win7 builds - if you query for a DirectSound capture interface, it will hang that thread forever. Capture support isn't generally considered useful for gaming, but I wrote a whole SAPI interface to allow my games to take voice commands, and thats all trashed now.


Well, won't TeamSpeak and that sort of thing use DSound Capture aswell?
At any rate, I've looked into it a bit...
You say you query for a DirectSound capture device. How do you do this exactly? You call QueryInterface on the regular DSound object?
I've tried this small sample app, using DirectSoundCaptureCreate8:
#include "stdafx.h"
#include "dsound.h"


int _tmain(int argc, _TCHAR* argv[])
{
LPDIRECTSOUND8 lpDS = NULL;
LPDIRECTSOUNDCAPTURE8 lpDSC = NULL;

if (FAILED(DirectSoundCreate8( &DSDEVID_DefaultPlayback, &lpDS, NULL )))
{
printf("Failed to create a DirectSound8 device\n");
}

if (FAILED(DirectSoundCaptureCreate8( &DSDEVID_DefaultCapture, &lpDSC, NULL )))
{
printf("Failed to create a DirectSoundCapture8 device\n");
}

if (lpDS)
{
lpDS->Release();
lpDS = NULL;
}

if (lpDSC)
{
lpDSC->Release();
lpDSC = NULL;
}

return 0;
}


It works without a problem on Vista x64 and Win7.
I did however find this:
http://msdn.microsoft.com/en-us/library/microsoft.directx_sdk.reference.directsoundfullduplexcreate8(VS.85).aspx
The DirectSoundFullDuplexCreate8 function creates the DirectSound and DirectSoundCapture objects and returns the IDirectSoundFullDuplex8 interface. This function requires Microsoft Windows XP. Full duplex can be implemented on other operating systems, but the capture and rendering devices must be created separately.


So if you are using QueryInterface on XP, that might explain why it works... In XP you have full duplex support, where apparently the output and the capture devices are somehow related. In other OSes you need to create them separately. But I was able to do that on Vista x64 with the above code.
Posted on 2009-12-28 06:42:21 by Scali
The full duplex support under XP is really a thin wrapper driving regular DirectSound interfaces.
I was simply calling DirectSoundCaptureCreate8, so this problem remains unsolved - I can only guess that the person testing the binary for me didn't have DirectX runtimes installed - but it failed for two individuals, one of them is a gamer and runs vista/64, I'm pretty damn sure he'd have the runtimes installed.


    SetObject esi
    ; Obtain Capture interface
    .if bWantMicrophoneOnly==TRUE
        lea eax,DSDEVID_DefaultVoiceCapture
    .else
        lea eax,DSDEVID_DefaultCapture
    .endif
    lea edx,.pDSC
    invoke DirectSoundCaptureCreate8,eax,edx,NULL
    .if eax!=S_OK
        DbgHex eax,"D3D_Audio.Init_Capture_Support: Error during DirectSoundCaptureCreate8"
        xor eax,eax
    .else
        mov eax,TRUE
    .endif


Looks ok to me - this is the code that was not returning to caller..

I've just about finished integrating Asynch File IO support into our IOCP networking engine.
Early tests are good - I am throwing events from IOCP Worker threads to an external callback object associated with each opened file, all good, but I'm seeing some unexpected errors related to filepointer which are bugging me.
I'll have to check over my code a few more times before I post it, but I promise that this functionality will definitely make it into OA32's public library, and that you'll see it here first!
Posted on 2009-12-29 21:36:11 by Homer

The full duplex support under XP is really a thin wrapper driving regular DirectSound interfaces.
I was simply calling DirectSoundCaptureCreate8, so this problem remains unsolved - I can only guess that the person testing the binary for me didn't have DirectX runtimes installed - but it failed for two individuals, one of them is a gamer and runs vista/64, I'm pretty damn sure he'd have the runtimes installed.


It could also have been a buggy driver. Eg onboard audio.
Vista audio drivers were quite poor at first, but all that should be solved now.
At any rate, it works on my Vista x64 installation, so it's not like it's completely broken (which I would find strange anyway, since there's probably quite a few games that use it for voice chat and such... I would have heard about problems sooner, if it was really broken. Microsoft can't really afford to break something like this).
Posted on 2009-12-30 05:02:11 by Scali
December 2009 results are in for the Steam hardware survey
Short version: XP dropped another few % this month, down to 44.77% now.
Windows 7 is up to about 23% marketshare, 16% of which is the 64-bit version.
A massive increase of 8.7% in just one month.
It looks like Windows 7 is quite literally taking the market by storm.
Posted on 2009-12-31 02:43:40 by Scali
Yeah, looking a lot like the worthy successor that vista wasn't.

Found and fixed the bugs in my Asynch File IO stuff.
Some were silly, some less so.
Ready to test some stuff - I've got a simple testbed demo (OA32 dialog class), but its time to stress test it, say, multi file copying or something.

I think some operations will need to be thread-quarantined (mutexed).
But its working great for a single file, and the callback interface has been more clearly defined.
Error checking has been improved although it wasn't too bad.

NetComFile is the name of the new class, and NetComFileEvents is the name of the callback class.
File read/writes are implemented via NetComEngine's existing IOJob pool.

NetComFile has a bunch of useful utility methods related to file operations.
Random Access is supported, but is not intended.

NetComFileEvents callbacks are:
OnProgress: called when data has been read (write needs more work?)
OnEOF: called when the file data is exhausted
OnClose: called when the NetComFile object is released

You can open a file with any combination of access flags, its perfectly ok to both read and write the same file.
This poses a dilemma in a multithreaded, asynch environment, wouldn't you say?
I don't enforce orderly operation or guarantee behavior when using RW access.
Rather, each R/W operation is marked with a 64 bit file offset.

Everything looks nice and clean and contextual, complexity has been just slightly increased.
Worker threads need to examine the IOJob operation code, and determine whether we're dealing with an IOMSG, a network Job, or a file Job.
Socket Jobs use WSAGetOverlappedResult, File Jobs use GetOverlappedResult.
But BOTH use GetQueuedCompletionStatus.




Posted on 2009-12-31 04:05:50 by Homer

Yeah, looking a lot like the worthy successor that vista wasn't.


The irony is that although Vista may have had some teething problems (which aren't solely MS' fault, many third-party drivers and applications also caused problems that they shouldn't have), pretty much everything was fixed long before Windows 7.
It's just Vista's reputation that can't be fixed.
I stuck with Vista, and Windows 7 is a bit 'meh' to me. I'm sure that most other Vista users will feel the same.
I think Windows 7 mostly makes an impression on people who stuck with XP, and never gave Vista a fair chance... So they still have no clue about how nice Superfetch, hardware I/O prioritizing and that sort of thing are.
It's 99% marketing if you ask me. They couldn't save Vista's reputation, so they just sided with the anti-Vista crowd... The worse Vista looks, the better it makes Windows 7 look. And the strategy works.
Posted on 2009-12-31 04:19:53 by Scali
I think I'm ready to make the jump.
And I get vista backward compatibiliy for free :)

To me, Win 7 is sounding well-received, and I'm a sheep.
If people like it, I have to follow them.
I know it's just vista with a facelift and a workover, but that's exactly what attracts me.
Posted on 2009-12-31 04:22:07 by Homer