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
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
This example describes how Python opens and plays a WAV file using Wxpython. Share to everyone for your reference. The implementation method is as follows:
"' Wx_lib_filebrowsebutton_sound.pyselect a sound file and play Itwx.lib.filebrowsebutton.FileBrowseButton (parent, LabelText, Filemask) (combines WX. Textctrl and Wxfiledialog widgets) wx. Sound (fileName, isresource=false) tested with Python27 and wxPython291 by Vegaseat 25jul2013 ' Import wximp
In the study of "dialect and Chinese culture", we need to submit a recording, the phone's recording default is WAV format, need to convert to MP3 formatLinux can be converted with lameLame sample.wav sample.mp3lame-h sample.wav Sample.mp3 # highest qualitylame-h-b sample.wav Sample.mp3 # Fixed bit Rate Jstereo KbpsGUI tools are soundconverter, and there are several other toolsYou can also use the online conversionReference:http://blog.longwin.com.tw/2
This article describes how Python opens and plays a WAV file using Wxpython. Share to everyone for your reference. The implementation method is as follows:
"' wx_lib_filebrowsebutton_sound.py Select a sound file and play it Wx.lib.filebrowsebutton.FileBrowseButton (parent, LA Beltext, Filemask) (combines WX. Textctrl and Wxfiledialog widgets) wx. Sound (FileName, isresource=false) tested with Python27 and wxPython291 by Vegaseat 25jul2013 ' ' Im
Tutorial on how to capture a CD as a WAV file
1. First, the implementation of exact Audio Copy (hereinafter referred to as EAC) main program, open EAC main interface;
2. Then open the "drive options" in the EAC item in the menu bar to set up the catch mode.
Note: This is critical and directly affects the audio quality of the captured rail
3. "Catch mode" setting: It is recommended to use precise flow, disable caching, do not use C2 sec
1, import wave used to read and write WAV files
It provides a convenient WAV format interface.
However, compression/decompression is not supported and mono/stereo is supported.
Read format:
Open (file[, mode])
If file is a string, open it or treat it as a class file object.
Mode can be default, and if the input parameter is a class file object, then File.mode will be the value of mode.
Mode optional paramet
Using PHP to analyze and draw the waveform of audio files, the Internet is still rarely seen. In fact, as long as the specification of WAV files, using PHP fseek,fopen,fopen,pack/unpack functions, as well as the powerful GD graphics library, these are very easy. Many people may be unfamiliar with the pack/unpack function; this is actually PHP borrowed from Perl, and they provide a way to access complex binary data structures using scripting languages.
WAV conforms to the riff (Resource Interchange file Format) files specification, which is used to hold audio information resources for the Windows platform and is widely supported by the Windows platform and its applications, which also supports Msadpcm,ccitt A Law, such as a variety of compression operations, supporting a variety of audio numbers, sampling frequency and channel, standard format WAV files a
How to encapsulate pcm data into wav Files in C Language
Pcm is the raw audio data. wav is a common audio format in windows. It only adds a file header to the pcm data.
// WAVWriter. cpp: defines the entry point of the console application. // # Include "stdafx. h" # include
Using namespace std; typedef struct WAVE_HEADER {// RIFF char chunkID [4]; // long int 4-byte unsigned long chunkSize; // WAVE ch
How to Use JS to play wav files? Theoretically, JavaScript can be used to embed a window Player Plug-in a webpage to play the files ., However, the versatility is not very good. You can use it in IE. If you are interested, please refer to the following section to use the js0000.wav file.
The Code is as follows:
The mobile phone does not support music in wav format, but there is a music file in wav format that is quite appealing and wants to make a ringtone! It is known that mobile phones support music files in mp3 format. What should I do now?
In most cases, you may think of using a special format conversion software for corresponding processing. However, after downloading a free small software from the Internet,
);
Cvreleaseimage ( src1 );
Cvreleaseimage ( src2 );
}
}
}
Play wav music
1. Insert a resource (insert-> resource-> Custom-> (enter Wava ))
2. Find the "Wava" file in resources and open an idr_wava1 file.
3. Right-click and choose import from the shortcut menu to view audio files suffixed with .wav.
4. Add the following in the constructor of cxxxxview:
Playsound (makeintresource (Idr_taobao_sent_sound),
(LPWAVEHDR); GlobalFree (HWAVEHDR);If successful you can go into the loop and play until you know the data is playing, as follows while(Waveoutunprepareheader (hwaveout) hwaveout, LPWAVEHDR,sizeof(WAVEHDR))! =mmsyserr_noerror) { //Loop Clear Buffer If successful means playback is complete//Loop The following statement if it has not finished playing if(bexit) Break;//let loops also respond to messagesMSG message; if(::P eekmessage (message,null,0,0, Pm_remove)) {
How can I save the rt of the wav binary stream from post on other pages, I learned php for only one week and was used to build a project. it is miserable. TT ------ solution ------------------ this is irrelevant to the java processing method. if the multipartform-data header information is sent during data transmission, then php will separate it and process it as an uploaded file. Instead of providing it as a stream. how can I save the
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.