Sound, Wave, Multimedia, API, How? 
Author Message
 Sound, Wave, Multimedia, API, How?

This is a multi-part message in MIME format.

------=_NextPart_000_01BC757C.DBCEF820
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hi,

Try:

Option Compare Database
Option Explicit

'******* Declarations Section *******

Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA"
(ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal
uReturnLength As Long, ByVal hwndCallback As Long) As Long
Declare Function mciGetErrorString Lib "winmm.dll" Alias
"mciGetErrorStringA" (ByVal dwError As Long, ByVal lpstrBuffer As String,
ByVal uLength As Long) As Long

Public Function PlayAVI(FileName As String) As Integer
    PlayAVI = mciSendString("play " & FileName, "", 0, 0)
End Function

Public Function mciErrorDesc(ErrorNum As Long) As String
Dim Buffer As String * 256
Dim I As Long
    I = mciGetErrorString(ErrorNum, Buffer, 256)
    mciErrorDesc = Buffer
End Function

And you just need:

        PlayAVI "\\Elminster\c\windows\help\closewinn.avi"    ' Access 97
        if you doN't desire error messages,
or (Access 7 or Access 97):

        ? mciErrorDesc( PlayAVI( "\\Elminster\c\widows\help\closewin.avi"))
MMSYSTEM275 Cannot find the specified file. Make sure the path and filename
are correct.                                                              

        ? mciErrorDesc( PlayAVI( "\\Elminster\c\windows\help\closewin.avi"))
The specified command was carried out.  

Note that the new book from Ken Getz and Mike Gilbert has a whole chapter
on multimedia.

Hope it may help,
Vanderghast, Access MVP
------=_NextPart_000_01BC757C.DBCEF820
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<html><head></head><BODY bgcolor=3D"#FFFFE8"><p><font size=3D2 =
color=3D"#000000" face=3D"Arial">Hi,<br><br>Try:<br><br><font =
color=3D"#008000"><b>Option Compare Database<br>Option =
Explicit<br><br>'******* Declarations Section =
*******<br><br><br><br><br>Declare Function mciSendString Lib =
&quot;winmm.dll&quot; Alias &quot;mciSendStringA&quot; (ByVal =
lpstrCommand As String, ByVal lpstrReturnString As String, ByVal =
uReturnLength As Long, ByVal hwndCallback As Long) As Long<br>Declare =
Function mciGetErrorString Lib &quot;winmm.dll&quot; Alias =
&quot;mciGetErrorStringA&quot; (ByVal dwError As Long, ByVal lpstrBuffer =
As String, ByVal uLength As Long) As Long<br><br><br>Public Function =
PlayAVI(FileName As String) As Integer<br> &nbsp;&nbsp;&nbsp;PlayAVI =3D =
mciSendString(&quot;play &quot; &amp; FileName, &quot;&quot;, 0, =
0)<br>End Function<br><br>Public Function mciErrorDesc(ErrorNum As Long) =
As String<br>Dim Buffer As String * 256<br>Dim I As Long<br> =
&nbsp;&nbsp;&nbsp;I =3D mciGetErrorString(ErrorNum, Buffer, 256)<br> =
&nbsp;&nbsp;&nbsp;mciErrorDesc =3D Buffer<br>End Function</b><font =
color=3D"#000000"><br><br><br>And you just need:<br><br>&#009;PlayAVI =
&quot;\\Elminster\c\windows\help\closewinn.avi&quot;&#009;' Access =
97<br>&#009;if you doN't desire error messages,<br>or (Access 7 or =
Access 97):<br><br>&#009;? mciErrorDesc( PlayAVI( =
&quot;\\Elminster\c\widows\help\closewin.avi&quot;))<br>MMSYSTEM275 =
Cannot find the specified file. Make sure the path and filename are =
correct. =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&#009;? =
mciErrorDesc( PlayAVI( =
&quot;\\Elminster\c\windows\help\closewin.avi&quot;))<br>The specified =
command was carried out. &nbsp;&nbsp;<br><br><br>Note that the new book =
from Ken Getz and Mike Gilbert has a whole chapter on =
multimedia.<br><br>Hope it may help,<br>Vanderghast, Access MVP</p>
</font></font></font></body></html>
------=_NextPart_000_01BC757C.DBCEF820--



Sat, 27 Nov 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. multimedia control and wave files

2. Programming for MultiMedia:Sound

3. Sound Without Multimedia

4. Multimedia MCI Control repeats the sound forever

5. MultiMedia Sound please help

6. Can MultiMedia control play AVI with sound track?

7. Multimedia Control Quality of Recorded Sound

8. linking multimedia sound bits in a MS-Access database to a VB-application

9. Multimedia Sound amplitude and frequency

10. Multimedia Sound amplitude and frequency

11. Sound Wave files using Access 2.0

12. Send / Receive *wave files (sound) through Modem to phone line

 

 
Powered by phpBB® Forum Software