LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-29-2010, 03:49 AM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,225

Rep: Reputation: 49
My program could truncate the WAV file a bit. Will it still be playable?


Hi:
I think this is more of a programmer-like matter than anything else.

I take a WAV file and cut the tail, at some point beyond the header. Will this file still be playable by any player who could play it before the cut? That is the question.
 
Old 11-29-2010, 04:26 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950
Why not simply try it for yourself and find out?

I believe truncated .wav files will still work in most players, but the metadata information, such as the length of the track, will probably be incorrect.

I just ran a test where I cat-ed part of a .wav into a new file, and that's exactly the behavior I got.
 
Old 11-29-2010, 07:59 AM   #3
wje_lq
Member
 
Registered: Sep 2007
Location: Mariposa
Distribution: Debian lenny, Slackware 12
Posts: 809

Rep: Reputation: 178Reputation: 178
In the name of the Flying Spaghetti Monster,

I've written software that plays back wav files. For the purpose of playback, the only thing of importance at the end of a wav file is the tail end of the sound. For more information on the format, go to wikipedia. The list of external links at the end of the article may also interest you.
 
1 members found this post helpful.
Old 11-29-2010, 08:00 PM   #4
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,225

Original Poster
Rep: Reputation: 49
That's a fine answer. Thanks a lot. Thanks also be given to David the H.

Last edited by stf92; 11-29-2010 at 08:04 PM.
 
  


Reply

Tags
file, truncate


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
scp truncate text file busy - copying file is not a running binary jetberrocal Linux - Server 3 06-24-2010 04:56 PM
[SOLVED] File size limitations of a 32 bit program running under a 64 bit kernel acerostech Linux - Server 1 04-19-2009 11:01 AM
Long file names on Linux file server jumbled when opening on 16-bit PC program. brandonhughesj General 3 03-04-2009 08:53 AM
how do i make a playable dvd from an avi file? joel b Linux - Software 2 08-01-2005 01:46 AM
writing a c program in linux which plays an'.wav' file stephenwalter Programming 8 07-09-2005 12:37 AM


All times are GMT -5. The time now is 04:43 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration