I'm a bit sleepy at the moment but maybe I can give you a couple of ideas. Your use of the # seems a bit strange. Are you aware that whenever you have a variable with the # after it in DBC it is considered a floating point value? You can't dimension arrays (or you shouldn't be allowed to) with a float value. Even though I think DBC may let you get away with it, it's a bad habit to fall into and will bite you later on. I wouldn't be surprised if part of the sever exception comes from that because I don't know how memory would be allocated for such a call.
Anyway, digital music is sampled sound where a sample is the smallest unit representing an amplitude (volume) at a specific time in the entire sound file. A sample rate tells how many samples pass by in a second. The bit depth represents the resolution of the sample. The resolution can be thought of as how fine the increments between amplitudes can be. The frequency, is how often a certain arrangement of samples (usually in some kind of wave shape) occur within a second.
So, what does all this mean? The frequency won't really be meaningful for what you're trying to do so we can skip it for now. The bit depth in combination with sample rate and one thing I forgot to include is the channels - simultaneous occurances of samples (think of it as stereophonic or monophonic) - will determine the number of bytes that occur within a second. With this information, you can sync any time code you want with a certain number of bytes that you can calculate out. You can also do what Obese87 was saying where you search through the data and find occurances over or at certain amplitudes over a selected data sample. You look for repeating patterns of the same peaks or valleys within a tolerence. But that can get complicated.
Anyway, try to calculate out the time for a sound file you load into DBC. Use one that you actually know the time of and try to calculate it. The number of bytes per second should be
(bit depth/8)*channels*sample rate .
Then if you know the number of bytes for the whole file (if you make memblock from sound you can get the size of the memblock with
value=GET MEMBLOCK SIZE(<mem>

-header which I think is 12)
divide that by the number of bytes you figured out per second.
If you come out with the length in seconds of the sound file, then you're on your way. But my eyes are closing right now so I'm not even sure how accurate what I typed is.
Enjoy your day.