flat assembler
Message board for the users of flat assembler.

Index > Windows > Play 2 .wav files at the same time

Author
Thread Post new topic Reply to topic
eskizo



Joined: 22 Nov 2005
Posts: 59
eskizo
How do I do that ? I tried using threads but it does not work.

I dont want to create another forum thread, so:
Whats the simplest way to get a string answer from user ? something like a input box (delphi). Do I have to create my own dialog ?

LPCSTR InputBox(HWND hwnd, PCHAR quest, PCHAR title, PCHAR answer, DWORD alength, HBITMAP pic);

this function above would be very nice and simple.
Post 17 Nov 2006, 16:41
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
second question: you create console program, and use ReadConsole. For having it easier to parse the answer, use my FASMLIB. It handles some things for you (like conversion of string to number etc).

if you want windows GUI dialog, then AFAIK you have to create it yourself. But it will be just window containing editbox, not that big problem. (And even then you can use FASMLIB to convert numbers. In later version it will have routines to completely parse text in printf/scanf manner)
Post 18 Nov 2006, 11:30
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Quantum



Joined: 24 Jun 2005
Posts: 122
Quantum
eskizo wrote:
I tried using threads but it does not work.

winmm!PlaySound can play only 1 wav at a time. You can use DirectSound to play 2 or more sound files simultaneously, apply effects, etc. You can find some examples in msdn and convert them to asm (not very hard). Or you can use a lib, like fmod.dll, if you don't want to use DirectSound... directly.
Post 18 Nov 2006, 14:56
View user's profile Send private message Reply with quote
Bambo



Joined: 07 Jun 2007
Posts: 1
Bambo
Try mciSendString.If you don't tell it to seperate the files it plays them together.At least in VB..

_________________
Please, excuse my english.
Post 07 Jun 2007, 17:56
View user's profile Send private message Reply with quote
karl



Joined: 07 Feb 2006
Posts: 63
Location: South Africa
karl
also try wavemix, microsoft's solution to this problem. http://www.vbexplorer.com/VBExplorer/sound2.asp

totally sucks. you can't do sound properly without directx. apparently there is a latency issue with wavemix: http://www.compuphase.com/wavemix.htm

hrmf.
Post 21 Jul 2007, 16:39
View user's profile Send private message Reply with quote
karl



Joined: 07 Feb 2006
Posts: 63
Location: South Africa
karl
htmf. doesn't even seem to work properly. at this this example doesn't: http://www.programmersheaven.com/download/6794/download.aspx

not really... switches from one channel to another to accomodate multiple sounds. and cuts sound out too...

arrghh!
Post 21 Jul 2007, 16:43
View user's profile Send private message Reply with quote
karl



Joined: 07 Feb 2006
Posts: 63
Location: South Africa
karl
how on earth did games work before directx??
Post 21 Jul 2007, 16:46
View user's profile Send private message Reply with quote
karl



Joined: 07 Feb 2006
Posts: 63
Location: South Africa
karl
oo, this is good: http://www.geocities.com/SiliconValley/Way/3390/mnoise.html

summary: without directx you get bad audio (8-bit) and latency (delay from call and actual sound output).
Post 21 Jul 2007, 16:54
View user's profile Send private message Reply with quote
chaoscode



Joined: 21 Nov 2006
Posts: 64
chaoscode
what about mixing the sound self?
use the valuse and add them, or sth else...
(sin cos and these math things...)
Post 22 Jul 2007, 03:09
View user's profile Send private message ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.