forums

TNT Basic Forums > Programming Q&A
Load Sounds does not work
< Last Thread     Next Thread >
Author
Thread        Post A Reply

10-29-2005 16:34

Posted by:
sabshire

Location:
nitro, wv

Find more posts by sabshire

Well, I get the problem that no matter what I try, load sounds does not work.

I get the following when i try "loads sounds 128"

*** Runtime exception caught ***
Line# : 9
Code : load sounds 128
Error : snd resource 128 is missing.

I am running OS X 10.4.2

I went to the sounds tab, dragged a sound into the left hand side... then dragged it to the right hand side, and clicked save when prompted. Sounds appear to be missing when the project is reloaded. The sounds is shown in the bank with question marks.

10-29-2005 16:40

Posted by:
sabshire

Location:
nitro, wv

Find more posts by sabshire

Found a work around for me

If I change the project to be a mac resource, it works fine. not an ideal solution for some, but at least it gives a starting point to find the real problem.

10-29-2005 17:17

Posted by:
Maher Haddad

Find more posts by Maher Haddad

Sounds

There apparently is a bug with the sounds to where the program saves it in the resource file but then doesn't find it. Sounds to me like a typo in the code or something and should be easy to correcd if an ammendment to TNT-Basic 1.3 is made to correct this bug. It seems pointless to use the old file format since it only handles files up to 16 MB and as I've noticed doesn't run well on newer versions of OSX which have strayed even further from OS 9.

10-30-2005 10:03

Posted by:
Mark Tully

Location:
TNT HQ, England

Click Here to Email Mark Tully   Find more posts by Mark Tully

Yes, it looks like sounds resources don't work in the bundle resource file format. It should be an easy fix, I'll make it once the source is out. The old resource file format is 100% compatible with OS X and you'll get no problems at all compatibility wise. The only issue is the maximum size one, and that breaks both 9 and X in the same way.

You could work in the resource format for now, and save into the bundle format after the fix is released.

Mark

10-30-2005 12:47

Posted by:
allnodcoms

Location:
hertfordshire (England)

Click Here to Email allnodcoms   Find more posts by allnodcoms

Radical Idea...

Hi all, not on my Mac again so can't test this, but Mark has said elsewhere that it could be a problem with the space character in the 'snd ' rez descriptor. I can't see that being the case, but it may be a 'missed' space in one of the access calls. To test this, try Resource Exists ('snd', id) (without the space) and see if it returns a true. This would indicate a typo in the load functionality, or similar in the save code of Hieroglyph.
Doesn't solve the problem, but it does narrow it down for a debug. Could also try checking the resource type of the files saved with the bundle format.

Just a thought guys...

Danny (nods)

10-31-2005 16:53

Posted by:
allnodcoms

Location:
hertfordshire (England)

Click Here to Email allnodcoms   Find more posts by allnodcoms

OK, on a Mac again...

Right, radical idea didn't work did it... resource type has to be a long. Makes sense I suppose.

I kind of dis'd Mark for the whole space thing (soz Mark!), but I think he could be right (as he wrote the actual code, it's a possible eh?). BUT, I still think it's typo related. My guess would be that the loader code for the bundle format can't actually 'see' the sound. It shows up in the tab as it's listed in the SnBk file (which can be seen), but the code that resolves the bank's contents can't find it. It doesn't make sense for the file to be wrong, so it must be how it's accessed. The loader looks for a folder with the same name as the resource type to find. The folder created by the bundled project does not contain the elusive space, it is just 'snd', but adding it manually doesn't solve the problem.
Seems a bit strange that the only three letter rez type, or four if you include the damn space, is the only one that can't be found. Trailing spaces are relevant, so it's not that...

I'm kind of stuffed here, just thought I'd throw my two peneth in!

Danny (nods)

01-29-2006 02:33

Posted by:
Mark Tully

Location:
TNT HQ, England

Click Here to Email Mark Tully   Find more posts by Mark Tully

This is now fixed in cvs and will be in release 1.31.

Cheers,

Mark

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.