473,769 Members | 7,650 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to read the data of an audio file

Sir,

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

udhay

Apr 4 '07 #1
3 4331
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
language.

V
--
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
Sir
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.

regards

udhay

Apr 12 '07 #3
Udhay wrote:
Sir

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

4
4453
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/
2
2627
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...
11
3775
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...
1
2548
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...
5
16129
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...
2
13307
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
6
2856
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...
1
2443
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...
1
1747
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...
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10048
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9865
tracyyun
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...
0
8872
agi2029
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...
0
6674
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();...
0
5304
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...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2815
bsmnconsultancy
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.