473,890 Members | 1,825 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to read the data of an audio file


I want to read the data of an audio file in c++ (Windows).
What is the API which helps to read the data of an audio file.

I want to read BitRate,Audio Sample Size,Audio Sample rate and Channel


Apr 4 '07 #1
3 4335
Udhay wrote:
I want to read the data of an audio file in c++ (Windows).
What is the API which helps to read the data of an audio file.
You need to include <fstream>, and use 'std::ifstream' class, most
likely. Open the file as binary. Use 'read' member function.
I want to read BitRate,Audio Sample Size,Audio Sample rate and Channel
I am sure all those are parts of the data you can read. You just need
to know the format of the file and then read portions using proper data
types and chunk lengths. C++ language can't tell you what those are,
you simply need to know; and where you learn that is unspecified in the

Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Apr 4 '07 #2
Is there any sample code to read the audio file. and i want to write
it to another file.

If so,please let me know.



Apr 12 '07 #3
Udhay wrote:

Is there any sample code to read the audio file. and i want to write
it to another file.
Probably, have you tried Google? This isn't realy a C++ question.

Ian Collins.
Apr 12 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Nomen Nescio | last post by:
can anyone be so kind as to look at http://www.mysolution.ws/HYPOCRITE.php and let me know why it isn't passing the form data to http://www.mysolution.ws/insertHYPOCRITES.php for the most part, the scripts were created with http://phpcodegenie.sourceforge.net/
by: ViperCB | last post by:
Hello from a newbie, I am trying to do some research on an upcoming project that involves reading in audio files of various formats and using the audio signal as a source of noise to generate pretty pictures. (like windows media player visual plugins. I will be developing in C++ and was wondering if there are any packaged libraries out there that I can use to read audio files encoded in different formats and lets me easily access the...
by: jim shirreffs | last post by:
Hello, I am trying to put together a Java system for playing audio CDs on a large CD player, I have most of it working But entering all the data like Artist, Title, track name, track length (seconds) is a real pain in the butt. What I would like to do is write a java class that would extrack that info from an audio CD placed in the computers CDROM drive. I have looked and looked and looked and looked, but I can not find any exambles of how...
by: Tito | last post by:
For an internet telephone application, I need to be able to read and write data to and from /dev/dsp simultaneously. I wrote some code and its not working. Anyone have any working code to do this? I am assuming my card is full duplex, it is a built-in sound card on a new dell 600m laptop, but I am not sure how to tell for sure. But I think the problem is not so much my sound card, but that I am making some fundamentally wrong...
by: Mark | last post by:
I have a VB 6 program that I have saved an audio file to using DAO and the appendchunk as is shown at http://support.microsoft.com/kb/103257/EN-US/. ; I have it working fine in that app (it saves to an access database and I can save the data back to a file using getchunk and everything works correctly). The issue is that I am now trying to access the database in VB.NET 2003 through an OleDBDataAdapter (Jet 4.0 connection) and can't get it...
by: dba123 | last post by:
I need help in coding the following or if you can just point me in the right direction: 1) Reading the follwoing XML document 2) Hook up a GridView to the data received from the XML document. The Grid should read lke this: Title Description Title
by: RickH | last post by:
Hello, I would like to create a user XSD data type that inherits from the w3 standard data type called ID to make sure a certain repeated element always contains distinct values. The problem is I would like this element to also allow spaces to be present. By default the ID data type does not allow spaces. How can I inherit ID and also allow the entry of spaces in the data of a new derived data type? This is a title column where I...
by: Sebouh | last post by:
Hi guys. I need your help to solve this problem. You see, i need to get the samples from an audio stream, to do FFT analysis. I need to read those amplitudes and pass them to an analyzer so i can check which frequencies are present in the sound. I'm having trouble accessing the sample values. I tried to create a small program which records sound and prints the values to the screen, but it keeps printing 130 and 131. I print out the bytes...
by: =?Utf-8?B?Qm9iQWNoZ2lsbA==?= | last post by:
I am using Windows Media Player to play my half second audio files one after the other using the code below... My problem comes when I play a second audio file immediately after the first one stops sometimes on slower computers the audio on the second file gets truncated on the beginning of playing the second file. What can I do to minimize this truncation of audio? Right now I am having to add 1 second of blank audio to the beginning...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.