You are not logged in or registered. Please login or register to use the full functionality of this board...
SIGN IN Join Our Community For FREE


Sound Idea
05-21-2017, 06:11 PM
Post: #1
 (Print Post)
Sound Idea
I think I need a bit of help. (No. Not 'that' kind of help...)

I am testing QB64's ability to play sound files.

This is the simple code that I am using...

Code Snippet: [Select]
CLS
PRINT "... Playing 'collect.wav'"
_SNDPLAYFILE "collect.wav", .5
_DELAY 1
PRINT "... Playing 'jump.wav'"
_SNDPLAYFILE "jump.wav", .5
_DELAY 1
PRINT "... Playing 'shoot.wav'"
_SNDPLAYFILE "shoot.wav", .5
_DELAY 1
PRINT "... Playing 'win.wav'"
_SNDPLAYFILE "win.wav", .5
_DELAY 1

PRINT

PRINT "... Playing 'collect.ogg'"
_SNDPLAYFILE "collect.ogg", .5
_DELAY 1
PRINT "... Playing 'jump.ogg'"
_SNDPLAYFILE "jump.ogg", .5
_DELAY 1
PRINT "... Playing 'shoot.ogg'"
_SNDPLAYFILE "shoot.ogg", .5
_DELAY 1
PRINT "... Playing 'win.ogg'"
_SNDPLAYFILE "win.ogg", .5
_DELAY 4

PRINT

PRINT "... Playing 'collect.mp3'"
_SNDPLAYFILE "collect.mp3", .5
_DELAY 1
PRINT "... Playing 'jump.mp3'"
_SNDPLAYFILE "jump.mp3", .5
_DELAY 1
PRINT "... Playing 'shoot.mp3'"
_SNDPLAYFILE "shoot.mp3", .5
_DELAY 1
PRINT "... Playing 'win.mp3'"
_SNDPLAYFILE "win.mp3", .5

I used the _SNDPLAYFILE to avoid using handles (could be laziness... lol).

I will attempt to attach the audio files. For this test, please make sure, that the files are in the same directory... but you already know that... Sorry. Force of habit.

Please let me know you results.

For me:
Collect and Win wav files did not play.
Collect ogg file did not play.
ALL mp3 files played.

Many thanks.

J


Attached File(s)
.zip  sounds.zip (Size: 513.5 KB / Downloads: 5)

May your journey be free of incident.

Live long and prosper.
Find all posts by this user
Like Post
The following 1 user Likes johnno56's post:
bplus
05-21-2017, 06:58 PM
Post: #2
 (Print Post)
RE: Sound Idea
Hi Johnno,

Some feedback (pun intended):

On my Windows 10 laptop, all the sounds played except 2:
collect.wav
win.wav

I was surprised to hear .ogg working Wink

Hmm... do I hear the sound of dripping coffee....?

B += _
Find all posts by this user
Like Post
05-21-2017, 08:56 PM
Post: #3
 (Print Post)
RE: Sound Idea
Did all the ogg's and mp3's play?

J

( Dripping coffee. I might see where you may be going with this... If these sounds work, then perhaps, they will work with the Barista game? )

May your journey be free of incident.

Live long and prosper.
Find all posts by this user
Like Post
05-21-2017, 09:42 PM
Post: #4
 (Print Post)
RE: Sound Idea
Quote:
Did all the ogg's and mp3's play?

Yes, good sign right?

I sure hope someone gets the coffee machine working around here. My doughnuts are lonely. Wink

B += _
Find all posts by this user
Like Post
05-22-2017, 04:36 AM
Post: #5
 (Print Post)
RE: Sound Idea
Thanks for doing that test. Much appreciated.

As you may have guessed, the experiment, DID have ulterior motive.

I have been experimenting with fonts as I don't care much for the default one... lol. I have also found a few sound effects as well. (Coffee Beans; Coffee Grinder and Milk Steamer) Getting the sound to sync properly is going to take a little more research. But it's all be patched together and seems to run ok. Eventually I would like to get some graphics in there... bit strange having sound with a text game... lol

I'll pack the assets and post the listing and assets in the 'coders' forum.

Just gone 6:30pm and I've only had ONE coffee today... this will not do...

Putting the keyboard away for a little while. Caffeine and munchies...

J

May your journey be free of incident.

Live long and prosper.
Find all posts by this user
Like Post
08-20-2017, 09:20 AM
Post: #6
 (Print Post)
RE: Sound Idea
Hi Johnno,

Here is the link I promised.
I don't know how far you got with your Sound Experiments, the Barista did have some sounds going...

In case you don't have everything figured out yet Walter gave a most excellent overview of Sound Commands here, see reply #15.
http://www.thejoyfulprogrammer.com/qb64/...79#pid4062

It was in the FreeBasic Board so you might not have seen it.

B += _
Find all posts by this user
Like Post



Forum Jump:


User(s) browsing this thread: 1 Guest(s)




QB64 Member Project - Color Rotating Text
QB64 Member Project - Kings Valley verion one
QB64 Member Project - Spiro Roses
QB64 Member Project - MAPTRIANGLE
QB64 Member Project - Spinning Color Wheel
QB64 Member Project - Blokus
QB64 Member Project - 9 Board
QB64 Member Project - Kings Vallery version two
QB64 Member Project - Domain
QB64 Member Project - Kings Court
QB64 Member Project - Point Blank
QB64 Member Project - Dreamy Clock
QB64 Member Project - Connect Four
QB64 Member Project - Qubic
QB64 Member Project - Line Thickness
QB64 Member Project - Isolation
QB64 Member Project - Input
QB64 Member Project - ARB Checkers
QB64 Member Project - Martin Fractals version one
QB64 Member Project - Bowditch curve
QB64 Member Project - Full Color LED Sign
QB64 Member Project - Pivet version one
QB64 Member Project - RGB Color Wheel
QB64 Member Project - Rubix's Magic
QB64 Member Project - Foursight
QB64 Member Project - Splatter
QB64 Member Project - Inside Moves
QB64 Member Project - Martin Fractals version two
QB64 Member Project - Martin Fractals version three
QB64 Member Project - Dakapo
QB64 Member Project - Sabotage
QB64 Member Project - Overboard
QB64 Member Project - Touche
QB64 Member Project - Pivot version two
QB64 Member Project - Red Scrolling LED Sign
QB64 Member Project - Algeria Weather
QB64 Member Project - Color Triangles
QB64 Member Project - Exit
QB64 Member Project - Martin Fractals version four
QB64 Member Project - Quarto
QB64 Member Project - Rotating Background
QB64 Member Project - STxAxTIC 3D World
QB64 Member Project - OpenGL Triangles
QB64 Member Project - Amazon
QB64 Member Project - Swirl
QB64 Member Project - Score 4
QB64 Member Project - Basic Dithering
QB64 Member Project - Othello
QB64 Member Project - Kobolts Monopoly