Author Topic: play a simple sound  (Read 1635 times)

adnan-utayim

  • Guest
play a simple sound
« on: May 18, 2014, 02:39:32 AM »
Hey guys,
I am actually not that experienced in using assembly language and I have to do a simple simulation of an alarm clock.
The algorithm works fine, but I am still missing the method of playing the sound file.
It shouldn't be that difficult since I only need to play a short wav sound or a system beep using masm32 instructions.
If anyone has a some simple instruction to do it I'd be very grateful.
Thanks in advance.

dedndave

  • Member
  • *****
  • Posts: 8734
  • Still using Abacus 2.0
    • DednDave
Re: play a simple sound
« Reply #1 on: May 18, 2014, 03:01:13 AM »
PlaySound works well with WAV resource sounds

http://msdn.microsoft.com/en-us/library/dd743680%28v=vs.85%29.aspx

dedndave

  • Member
  • *****
  • Posts: 8734
  • Still using Abacus 2.0
    • DednDave
Re: play a simple sound
« Reply #2 on: May 18, 2014, 03:02:29 AM »

farrier

  • Member
  • **
  • Posts: 58
Re: play a simple sound
« Reply #3 on: May 18, 2014, 04:11:27 AM »
You can look at:

\masm32\examples\exampl04\jacts\jacts.asm

Alarm with selectable alarm sound
Countdown timer
Stopwatch

hth,

farrier
For the code is dark, and full of errors!
It's a good day to code!
Don't Bogart that code, my friend!

adnan-utayim

  • Guest
Re: play a simple sound
« Reply #4 on: May 18, 2014, 05:02:52 AM »
I really appreciate your help
I looked into the resources you suggested and they are much of a help
thanx :)