Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Direct Sound Programming

Reply to topic
Author Message
Chris
  • Guest
Reply with quote
Direct Sound Programming
Post Posted: Sun Feb 06, 2000 6:04 pm
Does anybody out there know anything about Direct X Sound
Programming? I need my program to play a synthesized
square wave sound but I don't know how to do that.
I was thinking of using .wav files but that takes too
much out of the system and it's easily hackible.
I already have the COM setup but I don't know what
functions are available.

Please help,

Chris :o)
 
  • Joined: 12 Jul 1999
  • Posts: 891
Reply with quote
This is not an answer....
Post Posted: Mon Feb 07, 2000 2:03 pm
Quote
> Does anybody out there know anything about Direct X Sound
> Programming? I need my program to play a synthesized
> square wave sound but I don't know how to do that.
> I was thinking of using .wav files but that takes too
> much out of the system and it's easily hackible.
> I already have the COM setup but I don't know what
> functions are available.

> Please help,

> Chris :o)

What I would really like to see is a program that actually lets you draw your own waveform on a graph or something.... is there one at all?

~unfnknblvbl
  View user's profile Send private message
  • Site Admin
  • Joined: 25 Oct 1999
  • Posts: 2029
  • Location: Monterey, California
Reply with quote
Re: This is not an answer....
Post Posted: Sun Feb 13, 2000 11:28 pm

Quote
> > Does anybody out there know anything about Direct X Sound
> > Programming? I need my program to play a synthesized
> > square wave sound but I don't know how to do that.
> > I was thinking of using .wav files but that takes too
> > much out of the system and it's easily hackible.
> > I already have the COM setup but I don't know what
> > functions are available.

> > Please help,

Get the DirectX guide from microsoft if you haven't yet. (somewhere in www.microsoft.com/directx)
Good heavens no, don't use wave files, that'd be silly (but if it was 'hackible', what of it?)
You've got to jump through a few hoops before dsound lets you at the sound buffer (especially if you need position updates). You'd best read the docs first. Note that you'll want to set up a streaming/looping buffer.
If you really need some source code I could dig out mine (I'd do it now but I'm on a linux partition and it'd be abit of work to paste it into a message)
Warning: If you are using C (not C++) you have to use the longer C syntax:

i.e. MyDSObject->Release();
becomes MyDSObject->lpVtbl->Release(MyDSObject);

sorry to be vauge.

Quote
> > Chris :o)

> What I would really like to see is a program that actually lets you draw your own waveform on a graph or something.... is there one at all?

I think there are a few wave editors that let you edit a wave manually... It's not such a useful feature... it'd be near impossible to draw a full waveform of audible length and frequency that didn't just sound like an awful mess of static.
You could draw a single wave cycle and listen to a wave generated from that, bt you'd still get better results by generating a wave algorithmically.

sorry to be vague again.

Quote
> ~unfnknblvbl
  View user's profile Send private message Visit poster's website
some guy...
  • Guest
Reply with quote
Re: This is not an answer....
Post Posted: Wed Feb 16, 2000 7:44 am
Why are you programming in Windows anyway?
 
  • Site Admin
  • Joined: 25 Oct 1999
  • Posts: 2029
  • Location: Monterey, California
Reply with quote
Re: This is not an answer....
Post Posted: Wed Feb 16, 2000 8:16 am
> Why are you programming in Windows anyway?

Just to make you ill.
  View user's profile Send private message Visit poster's website
Chris
  • Guest
Reply with quote
Programming Under Windows (My reasons...)
Post Posted: Wed Feb 16, 2000 7:48 pm
Keep in mind I'm talking about Direct X, not GDI, MFC or whatever else is in standard windows...

1) It's very compadible.
2) It's very fast (speed depends on the idiot who codes the program)
3) Makes life easier (for the idiots who are too lazy to code hardware routines in asm)
4) Allows you to browse the web, check your mail, type up a document, and beat Mario Bros...All at the same time :o)
5) Let's me properly use my Sidewinder Joystick

Shall I continue?

Chris :o)
 
Reply to topic



Back to the top of this page

Back to SMS Power!