Embedding a sound 
Author Message
 Embedding a sound
I want to create a form which embeds short sound bytes from CD's (i.e. the
first 5 or so seconds of a song).  I've tried the default sound recorder as an
ole embedded object but get the little play window with controls.

Is there a simple little sound player which I can embed in my paradox form for
the user to click and listen.  I don't want any controls to pop up, etc.  I
will record my sound bytes as .wav files.

Thanks,

wristdoc



Tue, 11 Jun 2002 03:00:00 GMT
 Embedding a sound

Quote:

>I want to create a form which embeds short sound bytes from CD's (i.e. the
>first 5 or so seconds of a song).  I've tried the default sound recorder as an
>ole embedded object but get the little play window with controls.

>Is there a simple little sound player which I can embed in my paradox form for
>the user to click and listen.  I don't want any controls to pop up, etc.  I
>will record my sound bytes as .wav files.

Make sure you ask permission first, or the html guys will get you,
:-)

Ken



Tue, 11 Jun 2002 03:00:00 GMT
 Embedding a sound
Wristdoc,

To play a wave file in Paradox, use code like the following (pushButton
is used for this example):

PlaySound Function

The 32-bit counterpart to Mmsystem.dll is WINMM.DLL, and the function is
PlaySound. Here is an example:

Uses WINMM
  PlaySound(WavFileName CPTR, how CWORD, flag CWORD)
endUses

methodPushButton(var eventInfo Event)
  playSound("C:\\yourDir\\yourFile.wav",0,0)
endMethod

There are several values for Flag. Some of the parameters are:

0       play synchronously
1       play asynchronously
2       silence
4       points to memory file
8       loop the sound until next
16      don't stop any currently playing

This will just play the .wav file without showing any external app.

Hope this helps,

Liz
---
Get the lead out before you reply

Quote:

> I want to create a form which embeds short sound bytes from CD's (i.e. the
> first 5 or so seconds of a song).  I've tried the default sound recorder as an
> ole embedded object but get the little play window with controls.

> Is there a simple little sound player which I can embed in my paradox form for
> the user to click and listen.  I don't want any controls to pop up, etc.  I
> will record my sound bytes as .wav files.

> Thanks,

> wristdoc



Fri, 14 Jun 2002 03:00:00 GMT
 Embedding a sound

Quote:

>Wristdoc,

>To play a wave file in Paradox, use code like the following (pushButton
>is used for this example):

>PlaySound Function

>The 32-bit counterpart to Mmsystem.dll is WINMM.DLL, and the function is
>PlaySound. Here is an example:

>Uses WINMM
>  PlaySound(WavFileName CPTR, how CWORD, flag CWORD)
>endUses

>methodPushButton(var eventInfo Event)
>  playSound("C:\\yourDir\\yourFile.wav",0,0)
>endMethod

My understanding is that sound will only play on the computer's
internal speaker.  Or is that just for v 8?

Ken



Fri, 14 Jun 2002 03:00:00 GMT
 Embedding a sound
Ken,

No, that's a different function.  There is a method in Paradox called
sound() which takes frequency and duration as arguments, and plays that
frequency for that duration on the system speaker.  However, this will
only work on Windows NT - Windows 9x will just play the standard beep
for each call to sound.

playSound is a function from the Windows WINMM.DLL, and so long as you
have the ability to play .WAV files (sound card & speakers & Windows
multimedia tools installed), this function will work on any of the
32-bit Windows versions.

NOTE that this is *very* case sensitive, and should be entered in your
code exactly as shown below (in the Uses clause).

Regards,

Liz
---
Get the lead out before you reply

Quote:


> >Wristdoc,

> >To play a wave file in Paradox, use code like the following (pushButton
> >is used for this example):

> >PlaySound Function

> >The 32-bit counterpart to Mmsystem.dll is WINMM.DLL, and the function is
> >PlaySound. Here is an example:

> >Uses WINMM
> >  PlaySound(WavFileName CPTR, how CWORD, flag CWORD)
> >endUses

> >methodPushButton(var eventInfo Event)
> >  playSound("C:\\yourDir\\yourFile.wav",0,0)
> >endMethod

> My understanding is that sound will only play on the computer's
> internal speaker.  Or is that just for v 8?

> Ken



Fri, 14 Jun 2002 03:00:00 GMT
 Embedding a sound
Liz,
I'll give your sound example a try.  Thanks for always coming up with a
pertinent response.

Greg



Sun, 16 Jun 2002 03:00:00 GMT
 
 [ 6 post ] 

 Relevant Pages 

1. SOUND SOUND SOUND !!!! PDOX 7.0

2. embedded SQL:Problem during compilation in embedded sql(MSSQL) with VC++

3. Convertin embedded quel to Embedded SQL

4. WANTED: programmers who know how to program sound editors and sound experts!!

5. Sound effects database help

6. sound driver.

7. Sound delete-Trigger?

8. Does this sound like deadlock?

9. can a query play a sound???

10. Play Sound from stored procedure

11. Storing sound images in database

12. Best place to store pictures, sound, etc


 
Powered by phpBB® Forum Software