Mcisendstring is an API command used to play multimedia files. It can play MPEG, Avi, WAV, MP3, etc. Here we will introduce 1.Usage:1. Open a multimedia file.First, put a picture control on the dialog, and mcisendstring plays multimedia files on the plane of the picture control,Set the picture Control ID to idc_static1:Cstatic * pstatic = (cstatic *) getdlgitem (idc_static1); hwnd H = pstatic-> getsafehwnd ();Cstring open1;Char Buf [256];Open1.format
How can I play a wav-file from memory or blob-field?Sometimes you needs to play a some sounds from own app but store these sounds in blob-field of table or in some external files.
To play a wav-file you must call the playsound procedure which have the few parameters-sound (which you want to play ), handle of file with resource (only for WAV from EXE/DLL-file) a
usingSystem.Runtime.InteropServices;//put WAV Public Partial classFrmmain:form {System play music wav MP3 [DllImport ("Winmm.dll")] Public Static extern BOOLPlaySound (stringPszsound,intHmod,intFdwsound);//play Windows music, Reload PublicFrmmain () {InitializeComponent (); } //enter the system to play music Private voidM_systemplaywav (stringstrplayfile) { Try {
PHP implements the method of converting a WAV file into an image file and displaying it in a page.
The examples in this paper are the methods that PHP implements to convert WAV files into image files and display them in a page. Share to everyone for your reference. The specific analysis is as follows:
Requirements: Convert WAV files to PNG files and display them
WAV files are resource Interchange file formats (RIFF), including a number of named blocks that contain header information, such as a sound sampling format, or data (such as the sample itself). The Win API provides functions such as turning off Fiff files, finding blocks, and so on. The names of these functions begin with "Mmio".
The DirectSound API does not include methods for writing WAV files. However,
This uses FAAC to implement AAC encoding. In addition, the data segment of WAV is PCM, the code will appear many PCM abbreviations. 1 Download and install FAAC
The installation process here is implemented on MAC and Linux, and windows can be similar to the reference.
wget http://downloads.sourceforge.net/faac/faac-1.28.tar.gz
tar zxvf faac-1.28.tar.gz
cd faac-1.28
. Configure
make
sudo make install
If prefix path is used in the default configure, t
There are two types of audio recording in Android: audiorecord and mediarecorder.
The former is suitable for real-time processing of audio data.
The latter is suitable for storing audio and video locally.
However, the latter seems to only store MPEG4, Amr, and 3GPP media formats. Why do they be saved to WAV format? It is best to have a ready-madeCode.
Of course, if you tell me to use audiorecord to retrieve byte streams and splice them into
Question: How to play WAV audio files in the wince System
Mailing site: dianheting BBS (Tue Apr 15 12:55:40 2008), this site (bbs.cumt.edu.cn)
This example runs successfully in the wince5.0 +. Net cf2.0 environment.
The following namespace must be referenced in this example:
System
System. Io
System. Reflection
System. runtime. interopservices
System. Windows. Forms
This example shows how to use a platform call to play two
Wav files are also divided into several types, and the corresponding non-data information is stored in the file header section. Below are various WAV file header formats.
Table 1 wave File Header Format for 8 KHz sampling and 16-bit quantization of linear PCM speech signals (44 bytes in total)Offset address byte data type content file header is defined00 H 4 char "riff" char riff_id [4] = "riff"04 H 4 lon
If this problem occurs, search for historical data as usual.
One clue was found: "merging through WAV file format"
Let's take a look at the wav file format first.
Obviously, subchunk2size indicates the audio data size.
If the format is the same, try to merge the data area.
Of course, the subchunk2size audio data size and file size chunksize need to be recalculated
Type
Twavformat =Packed Record
Chunkid:Ar
I recorded audio in the past few days, but the files are huge. The mobile phone space is limited to 1 GB, And I suffer from no money.
After searching on the Internet, we can convert wav to the map3 format. We all know that map3 is much smaller. It turns out that this good tool has been around me and we use the built-in "recorder" of the system ", open "start" -->"Program"-->" Entertainment "--->" recorder ".
1. Open a file named "Recording 12.
Wav. h
// Name: WAV. h
Wav_file_formate.c
// Name: wav_file_formate.c
Compile wav_file_formate.c
Yuan @ Yuan :~ /Work/test/wav_file_formate> gcc-O wav_file_formate wav_file_formate.c
Run the program to read rawdata from the file test.g711and pack it into the file test.wav.
Yuan @ Yuan :~ /Work/test/wav_file_formate>./wav_file_formate test. g711 test.wav
Generate the test.wav file, which can be opene
This article describes the PHP implementation of the WAV file into the image file and display in the page method. Share to everyone for your reference. The specific analysis is as follows:
Requirements: Convert WAV files to PNG files and display them.
wav_to_png.php:
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
Windows mCi (media control interface)
Yes
Windows
Provides high-level and general control over multimedia devices.
. It provides a set of device-independent functions and
Command to effectively control multimedia devices.
By using MCI, we can easily perform operations on multimedia without having to understand the working principle of multimedia devices and call the underlying function library, which greatly reduces the difficulty and burden of development. Here is a small example of a
Sometimes, we write the program need to play music, generally we will use the following ways: 1. Place music files in a specific directory, such as Sound,wav,music for the program to read and play; 2. Use resources to store music. Some people may also use this method, but most people might have to release the music files from the resources before they read the playback. The way I'm going to present today is to load the music files directly into memory
First, your resources should be in WAV format and include header files and required library files as follows#include #pragma comment (lib, "Winmm.lib")
The declaration of the PlaySound function is:
BOOL PlaySound (lpcstr pszsound, hmodule hmod,dword fdwsound);
PlaySound (null,null,null); stop playing.
The parameter pszsound is a string that specifies the sound to play (generally the absolute path, if the sound file is copied to the executable file
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.