Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 7th, 2010, 11:39 AM
Registered User
 
Join Date: Jun 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Playing MP3 Files in Access 2007

I currently have a number of .WAV files that I play using Access 2007. I would like to convert those files to MP3 files (because they are much smaller) and play them using Access. I have the following code:

Module:

Code:
 
Option Compare Database

Const SND_ASYNC = (1)
Const SND_NODEFAULT = (2)

Declare Function sndplaysound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

Public Sub API_PlaySound(pWmaFile As String)

    Dim LResult As Long

    'Make a Windows API call to play a wav file
    LResult = sndplaysound(pWmaFile, SND_NODEFAULT + SND_ASYNC)

End Sub
And

Code:
API_PlaySound "Path\FileName.wav"
This code allows the audio to play without opening the Player for the user to see. It just plays in the file.

Is there code I can use to run MP3 files the same way?

Thanks All
Jack Kent





Similar Threads
Thread Thread Starter Forum Replies Last Post
problem playing mp3 from database in jsp page bikashnk Pro JSP 4 December 1st, 2009 01:59 AM
How to specify relative path to Access 2007 in ADO connection string? [Excel 2007] sektor Excel VBA 4 September 3rd, 2009 11:59 PM
playing sound files (java 2 jdk1.3 edition) naresh Java Basics 1 April 11th, 2009 01:04 AM
playing wid registry files amit.reply C# 0 March 17th, 2007 01:30 PM
playing audio files in c#.net sumith ASP.NET 1.0 and 1.1 Professional 0 February 7th, 2007 12:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.