Day 19 - Unicode, Threads ‘n Bears!
19 06 2008OK, maybe no bears…
Delphi has a problem, for those of you who don’t use it or are unfamiliar with it, an extant problem in respect of Unicode. Delphi hasn’t got a clue what to make of it (please don’t tell me about the commercial Unicode components, I know about them but the budget is stretched as far as it’s going to go this month).
This has never been a problem for me before. But today it bit and bit hard.
As I’ve mention before I’ve incorporated the Berg Components into MixAction (extensively) and they are really cool. The Playlist is actually NextGrid, part of this suite. I didn’t know I had any issues in this regard until I decided to fold the last remaining meta data folder into the Project file (or database) rather than leave it out in it’s own folder. Thus only media files would be external and everything would be nice and neat (and I might add repairable should anything untoward happen by way of text file truncation).
Not to be.
The NextGrid saves as Unicode! Now, I’m not complaining, this is technically a desirable feature. Problem is the rest of Delphi hasn’t a clue what to make of the data if I try to load it into something else.
Took me a an hour to work this out and finally decide to leave well enough alone for now. Said meta folder for the Playlist and associated files remain in situ in the project folder.
Cleaned up a lot of stuff today.
Removed unused variables and those types of things. Made sure all the User Preferences (options), which I also pruned down, functioned.
Switched off CD player auto-load when the program starts, and if it was turned on to start with, turn it back on when program exits.
Suspend the system screensaver while program is running (as opposed to turning it off altogether) as that’s bad news when playing audio files in a live situation, especially with Direct-X effects loaded and running.
Fixed a small bug in a zero based list, forgot the -1 in the code.
Made sure the hints work over the basic controls properly, haven’t done the advanced special effect control hints yet. Also making sure said hints reflect current control settings (increments, decrements).
Moved all the audio timing stuff into separate threaded timers with appropriate priorities.
This made a *massive* difference, predictably, in terms of how far you can push things. CPU usage dropped from an average of 17% to an average of 4%. Interface updates run 100% smoother, rarely any flicker occurring with other app’s loaded and I get none when the app is the only one loaded, which would be the normal state of affairs when using it.
Spent a good deal of time cursing Delphi’s implementation of TShellTreeview for being so bloody slow at updating. I’m considering replacing this as I find it totally unacceptable in terms of speed. I know most users won’t have eight partiions permanently available on their system as my dev machine does, but the implementation of this wrapper is very sloppy IMHO.
Implemented detection of audio overload. If the user pushes the levels past “safe” a little, modeless, window slides up from the bottom of the main screen and warns them. These kind of “warning hints” can be turned off if the user wishes however.
Added a bunch of miscellaneous safety options for systems with older components, like some errant and ancient CD players that object to having their status monitored. User can turn status monitoring off if they need to.
Way behind on the help file, I should point out, and I’m not happy about that.
Still no solution, not that I worked on it today, on the CD burning front.
I wasn’t going to write this entry tonight as I hadn’t felt like I’d gotten anything done. Glad I did as reviewing it I got quite a bit done which makes me feel a lot better. The day started with a power blackout and I couldn’t write a lick for five hours. Got to do something about that by way of a generator and UPS I’m afraid.
OK. More fiddly stuff tomorrow. I’ve simply got to get the track properties implemented, along with fading or I think I’ll go nuts.
Also looking like another all weekender. Tuesday my eldest is in a school play (how ironic!) and I have to attend that, which at it turns out requires my presence for most of the afternoon and evening. So Tuesday will be a no work day and Wednesday morning is tied up with other things.
Later…
Quote of the day:
I have a new philosophy. I’m only going to dread one day at a time. - Charles M. Schulz















Recent Comments