473,388 Members | 1,352 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Length of wave file?

Hi!

Is it possible to get the length of a wave file? I just want to
calculate the length and no other shit ;)

IŽd like to do it manualy instead of using any win32 api, but i
appriciate solutions in both ways.

Cheers,
Lars
Nov 15 '05 #1
4 2135
Lars,

I'll asume you mean the length of play time.
Simply Yes, you could do it if you loaded the file, determined the bit rate
and frequency, then do the calculation. But WHY would you want to go through
all that trouble. ;)

I would suggest resigning yourself to using the winmm.dll.

Hope this helps.
--
Glen Jones MCSD

"Lars Stenberg" <ls***@psycat.net> wrote in message
news:%J********************@newsb.telia.net...
Hi!

Is it possible to get the length of a wave file? I just want to
calculate the length and no other shit ;)

IŽd like to do it manualy instead of using any win32 api, but i
appriciate solutions in both ways.

Cheers,
Lars

Nov 15 '05 #2
Glen Jones MCSD wrote:
Lars,

I'll asume you mean the length of play time.
Simply Yes, you could do it if you loaded the file, determined the bit rate
and frequency, then do the calculation. But WHY would you want to go through
all that trouble. ;)

I would suggest resigning yourself to using the winmm.dll.

Hope this helps.


Hi, Again!

Thanks for your answer, where can i find some api-reference for winmm.dll?

Or do you know what function to call?

Cheers,
Lars
Nov 15 '05 #3
Lars,

I would suggest searching MSDN for the header file for the DLL. The header
file is called "Mmsystem.h"

Sorry I couldn't find it quickly, but I'm sure if you read the following
docs I'm sure you'll figure it out.
The Platform SDK: Windows Multimedia documant "Waveform Audio" has all the
information you need.

If you have further questions once you find the APIs you need, please
repost.

--
Glen Jones MCSD

"Lars Stenberg" <ls***@psycat.net> wrote in message
news:Er********************@newsc.telia.net...
Glen Jones MCSD wrote:
Lars,

I'll asume you mean the length of play time.
Simply Yes, you could do it if you loaded the file, determined the bit rate and frequency, then do the calculation. But WHY would you want to go through all that trouble. ;)

I would suggest resigning yourself to using the winmm.dll.

Hope this helps.


Hi, Again!

Thanks for your answer, where can i find some api-reference for winmm.dll?

Or do you know what function to call?

Cheers,
Lars

Nov 15 '05 #4
Hi again!

I sorry but i cant figure out, iŽve searched google for hours =/

Anyone could tell more precisly what to dig for?

Regards,
Lars

Glen Jones MCSD wrote:
Lars,

I would suggest searching MSDN for the header file for the DLL. The header
file is called "Mmsystem.h"

Sorry I couldn't find it quickly, but I'm sure if you read the following
docs I'm sure you'll figure it out.
The Platform SDK: Windows Multimedia documant "Waveform Audio" has all the
information you need.

If you have further questions once you find the APIs you need, please
repost.

Nov 15 '05 #5

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

Similar topics

1
by: webstar | last post by:
hi, could you please tell me how to play a small wave file if a button is pressed. or if there is another format that is easer then use that instead of wave. thanks matt
0
by: david.kettle | last post by:
Hello Python World! I've been playing with the 'wave' and 'audioop' modules in the library, and I have a question. When I tried to read a "wav" file with samples in 32-bit float, I got the...
4
by: vikram | last post by:
in a stereo type of wave file i want to know what is this left & right info in a wave file??? how do i read the left & right info from a .wav file to a buffer..
3
by: VenuGopal | last post by:
hi, i want to store the WAVE FILE CONTENTS in an XML. How do i do it? thanks Venugopal
0
by: Lars Stenberg | last post by:
Hi! Is it possible to get the length of a wave file? I just want to calculate the length and no other shit ;) A complete solution or guidness to the actual api responsable for the feature im...
5
by: m.topczewski | last post by:
Hello, I'm a beginner in c++, i have to write a program that will take couple of segments from one wave file, and store them in another wave file to be played back later. Here's the code i have...
0
by: Simrat Kaur Sandhu | last post by:
hello friends can anybody tell me how to read data from a wave file.. i have writen code as ... class file { private: FILE *fp; char id; char *sound_buffer; //four bytes to hold 'RIFF' long...
0
by: Karthik | last post by:
Hi, I want to record a sound wave from a mic and at the same time invert it and play the inverted wave.My code goes as follows, however nothing is written into the E:\inverted.wav file.Thanks in...
1
by: homevista | last post by:
Part II: Wave file - How to read to a buffer Wave (or Wav) is the standard format for storing audio data on the PC. As software developers, we are interested in the internal structure of the file...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.