Link to home
Start Free TrialLog in
Avatar of gvector1
gvector1

asked on

Audio

Someone please help. I have posted a topic in the C# forum and have not gotten a reply yet.  I figured I would post it here to ask for some information on how to do this in any language.  Here is what I am trying to do:

I am currently using Windows Media Encoder 9.0 in C# to encode an audio file into a wma format.  Basically the user runs this program to record input from a microphone into a WMA format.  I can also navigate the file(fast forward and rewind during playback).  What I would like to be able to do is for the user to navigate to a certain position and start recording in that spot of the file without overwriting what was recorded before that spot.  Basically duplicating the actions of a tape recorder.  Can someone please give me some pointers on how to accomplish this.  If no information can be given specifically on this, I could use some information on how to edit a wma file.  More specifically on how to append an audio file.  I need some information on how to do this in C#, but I will accept information on how to do this in any language as that may help me determine how to accomplish this in C#.  This question would be worth 1000 points if someone could find some helpful information for me.  For the time I will award the maximum of 500 for a post to anyone that can help.  

Thanks for any and all attempts,
Kendal
Avatar of Jaime Olivares
Jaime Olivares
Flag of Peru image

There are many audio manipulation articles in C# at codeproject.com.
Some examples that write/modify audio data:
http://www.codeproject.com/cs/media/cswavplayfx.asp
http://www.codeproject.com/cs/media/showwaveform.asp
More articles in C# at:
http://www.codeproject.com/cs/media
Avatar of gvector1
gvector1

ASKER

Those are some very interesting links and I may be able to use them in the future, but I need something that will help me determine how to combine or append audio files.  To be more specifically, wma audio files.  Any pointers in that direction?

Thanks again,
Kendal
ASKER CERTIFIED SOLUTION
Avatar of Jaime Olivares
Jaime Olivares
Flag of Peru image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Also luck at this project:
http://nbass.sourceforge.net/
Very Very helpful resource.  I am still trying to make use of it right now.  I am having to look into the origional Windows Media Format SDK to determine how to use it and the based on how the Translation is, again determine how to make use of it.  Another thing I would like to know is if I am approaching my problem correctly.  Like I said before, I am currently creating a wma file using windows media encoder.  I need for the user to be able to record over any section of the wma file with a new recording.  Say a file they just recorded is 15 seconds long and they realize they have a mistake in the middle of it.  They rewind to the 7 second mark and record 5 seconds worth of new audio.  The file should still be 15 seconds long, just from seconds 7-12 is new audio.  The only way I have determined to accomplish this so far was to record the origional file.  If they need to record over a certain section of the file, the program would create a new recording, make a second copy of the origional recording, trim the end off of the origional and the beginning off of the second copy, append the new recording to the first half of the file and append the last half of the file to that.  It seems like a lot of work and I hope it was not confusing, but is there another way to accomplish this.  Is it possible to just encode over a certain section of the origional or do I have to trim and append files????????

Thanks again,
Kendal
In a compressed encoding scheme it is not so easy because a particular portion of audio is linked to previous data, maybe you can cut at compressed block boundaries but not at any point. To do that you must decode data, manipulate (cut/paste/effects) it and encode it again.
So would my origional approach be the way to go(Encode 2nd file, copy first, trim ending off first, beginning off second and combine all three)????  How would you approach the problem?  Is the WMFSDK what I should use?

Thanks,
Kendal
Your method is straight and simple, if works, then use it.
Thanks,

You have been extremely helpful and have earned the points.  If you would like the 1000 points I spoke of, let me know and I will post a continuation to this question in which I will award you the remaining 500 points.  You have been the only one that has been able to help me on this topic and I greatly appreciate it.  If I have any more questions in this subject I will post back in this forum.

Thanks again,
Kendal
Thank you for the offering but recently we have received a EE newsletter where they are limiting to receive an accumulate points to 500 for a single question. Thanks anyway, see you in the next question.