iris 3d issue

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
dciris
DCEmu Junior
DCEmu Junior
Posts: 42
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Thu Feb 06, 2003 3:51 pm
Has thanked: 0
Been thanked: 0

iris 3d issue

Post by dciris »

HI
having problems getting the vorbis sound code and iris3d to work together.
They work independently but together the ogg vorbis seems to be interfering
with the rendering of the graphics. Once the sound stops playing the
graphics continue to render but of course need them working together.
Don't know much about threading but when calling the function to start
the playing of the ogg vorbis file its seems to be creating its own thread
and testing with printf statements indicates that the code continues to
run up until the time to render.
heres what I get on my end my printf statements are indicated by *

before sound *
sndserver: initializing libtremor 1.0 [Tremor 20020902 based]
sndserver: pid is 3
snd_init(): loading 3408 bytes into SPU RAM
oggthread: waiting on semaphore
sndserver: successfully created thread
oggthread: initializing and parsing ogg
before time *
after time *
before beginscene *
oggthread: released from semaphore (status=2)
oggthread: stream_init called
oggthread: stream_start called

so it seems to be getting stuck right about here when ogg sound is playing

c.BeginScene();
samples.Render();
c.EndScene();

I would greatly appreciate if anyone has a solution to this.
dciris
DCEmu Junior
DCEmu Junior
Posts: 42
Joined: Thu Feb 06, 2003 3:51 pm
Has thanked: 0
Been thanked: 0

Post by dciris »

I guess what I'm really asking is there a way to let two things run at the same time...
ex Graphics code
Sound code

My graphics run but if I push left the sound will play and then the graphic will move to its position that the left button was supposed to bring it to in the first place....

It wquld be nice if the music could loop and the graphic could move to its position in left when left is pushed...

There seems to be a conflict

I have been using ogg b/c the wav format only plays like 2 secs for my loop is like 10 secs long :roll:

P.S. I posted on boobs iris forum thanks for the link :)
dciris
DCEmu Junior
DCEmu Junior
Posts: 42
Joined: Thu Feb 06, 2003 3:51 pm
Has thanked: 0
Been thanked: 0

Post by dciris »

Does anybody know of any examples of multi threading?....
gruiiik
DC Developer
DC Developer
Posts: 11
Joined: Wed Oct 02, 2002 12:56 pm
Location: Paris, France
Has thanked: 0
Been thanked: 0
Contact:

Post by gruiiik »

Hi, to answer question, i've never used ogg with iris. I think it complety useless
to use ogg if you wan't to make a game because it take too much CPU and dc
can play wav sample and cd music.
For the multithreading part, a game console is not a pc, try using
the dc timer it's a lot better.
Bye, olivier.
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

Using OGG with most DC homebrew stuff shouldn't really be a problem. It's not like we're going to be making anything complex enough that it needs all of the DC's CPU time to work.
Ian Micheal
Soul Sold for DCEmu
Soul Sold for DCEmu
Posts: 4865
Joined: Fri Jul 11, 2003 9:56 pm
Has thanked: 2 times
Been thanked: 4 times

Post by Ian Micheal »

You could use the SDL mixer the ogg player is a lot better and easyer to work with. i have used it with kos code and grafix at the same time with out much problem. if you want a sample bit of code i can do i also have for download a complete pack of SDL precompiled bins so that would help.
Dreamcast forever!!!
gruiiik
DC Developer
DC Developer
Posts: 11
Joined: Wed Oct 02, 2002 12:56 pm
Location: Paris, France
Has thanked: 0
Been thanked: 0
Contact:

Post by gruiiik »

Is someone know if the ogg player use sh4 or arm to decrunch the file ?
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

Don't think so. Apparently, they're no slower than the MP3 players (which also aren't optimised). I'm pretty sure we also have a integer-only Vorbis decoder, which might (or might not) be faster.
Alexvrb
DCEmu Ultra Poster
DCEmu Ultra Poster
Posts: 1754
Joined: Wed Jul 17, 2002 11:25 am
Has thanked: 0
Been thanked: 0

Post by Alexvrb »

I thought that the integer-only solution was designed for devices (like handheld) that lacked a FPU. It'd probably be slower on the DC, if quality of the decoding was the same.
If you have twenty monkeys,
banging randomly on typewriters,
they will in twenty minutes produce the complete source code to World of Warcraft.
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

It depends on the system you're running it on. On some systems with an FPU, especially most older PCs which really poor FPUs, it can actually be faster. I doubt it'd be any different on a Dreamcast, since it's FPU is pretty much as fast as it's integer units.
Post Reply