How can I convert any audio file to an .ogg in C#? - c#

I'm creating a C# winforms application in Visual Studio, and the user is going to upload any audio file that is then automatically converted to an ogg file and placed in a certain directory.
Are there any DLLs or something similar that can do this conversion? I've visited Alvas.Audio, but I'm going to be distributing this application and that's against their license.
I'm also pretty new to C# programming and pretty much taught it to myself, so I need pretty specific instructions, sorry.
Any help?

Related

Catia CATProduct & CATPart File Formats

I am trying to write a CatProduct/CatPart to step translator. I am writing this in c#. Just want to know if anybody knows what file format is a CatProduct or CatPart is saved in. The principal reason I want to read both file format is to establish the LASTSaveVersion contained within these files. Such information will allow me to translate using the correct Catia version of the CatBatchStarter dos utility. This windows application will ideally translate without entering the Catia modelling environment. This windows application will batch translate as well.
Any help much appreciated.

C# Storing files in .bin and then extracting them as a setup

What I want to know how to do is Store files as a .bin and be able to extract them using an application made in C#, I have attempted to do research on this but its a bit hard when the terminology for it and what you can search is vague as all hell.
I simply want to make my own installer and be able to keep files (exe, dll, ini etc) in a either 1 or multiple .bin files and then when the program is ran the user can click on 'install' and then the program will extract the files that are stored and place them in the a desired location. I have seen it done in C++ but I can't find much on it in C#, if this is 'not possible' then could someone give me some resources for C++ or show me how?
Kindest Regards CodeX

How does Unity handle folders and files in exported games?

I am quite new in game development with Unity and was wondering how the "export game" function of unity works. I not yet used this function in unity, but I've read that it will generate some .exe file from your complete game. I also read that it will create a "data" folder or something like that.
My question is: What exactly is stored in this "data" folder? And how can I write logic to save my own files (e.g. files which contain save states, settings, configurations, etc.) in some file inside this directory (which is then shipped with the complete game / created in the local game directory after the user e.g. saved his game the first time? Can i e.g. save those files in a relative path (e.g. ./MyGame/data/savegames)?
And which types of files can I create? Text / Binary? Or can I even use some relational Database (some small one like HSQLDB)?
And how are things like models, sounds, animations and other assets treated? Are they all packaged within the .exe file which is my complete game? Or do i have some seperate folders with the shipped game for them?
Thank you!
The data folder (named the same as the exe file, but _Data on the end instead of .exe, which can be safely renamed to just Data) contains all of the dlls that actually run the game (even a blank Unity project will have them! The unity engine itself compiles to several dlls) as well as any Resources you might have (tip: stop using resources and use Asset Bundles instead).
Omitting this folder would be very bad indeed!
As for reading/writing other data from the hard disk (which is not possible on all platforms--looking at you web deployment) I would recommend using your own folder, eg. RuntimeData which could contain external audio, image, or video files as well as mutable data such as save games or screenshots. Pretty much anything you'd be ok with your users modifying without seriously breaking stuff (modding is "in" these days).
As for the types of file: well, that's up to you, really! Creating text files (of any extension: xml, html, dat, qqq...) is very easy. Images tend to be done through a 3rd party script (do you really want to write your own JPG converter? Video, same thing). You can also create binary files following a format of your own choosing. The only difficulty is writing the serializer and deserializer for the data, which would scale in difficulty as the complexity of the data scales.
You have full file system access* so you can realistically read or write anywhere. This is C# we're talking about. But with great power comes great responsibility.
*Note: Mobile devices heavily frown on that sort of thing and will deny access to folders outside the one explicitly given to that application.

Reading Guitar Pro files

I was wondering if anybody had heard of a library, preferably a .NET assembly, but Java will do as wel, that allows you to read the data in a Guitar Pro file (.gp3-gp4-gp5)
I have this gigantor of a folder with about 50.000 song files, and would really love to write something that can actually archive all these files, for easier searching. And basic information like the tuning of the instruments in the song would be very useful parameters to retrieve from the file and add to the database.
I have searched the web but have yet to find anything like this, or a file definition for writing my own parser.
Thank you in advance for any information on the subject.
TuxGuitar is an open source Java application that includes classes that read Guitar Pro files. If should be probably more that sufficient for reading basic metadata.
Your other option is using reverse-engineered file format documentation - there's one from DGuitar project.
Your third option is trying to re-use some code from KGuitar project, that also include Guitar Pro 3/4/5 files importing clasess, but it's in C++ and Qt.
Please look through my open source project that is written in C# for Windows Phone7:
http://phoneguitartab.codeplex.com/
This is tablature viewer for Windows Phone 7. It can open guitar pro (.gp3, .gp4, .gp5) and text based files (I've used open source projects in Java to create guitar pro parser in .NET). Unfortunately it isn't finish yet but I hope you find something useful in this project.
Update: GuitarPro functionality was moved into branch

Record and save audio in c# .net web application

Is there anyway that I can record sound from a microphone using c# .net
What is the best option if i have to save the audio online in terms of the file occupying storage space.
Any particular format that the file should be saved in for optimum output.
I think you have to use either a small flash application or a silverlight application to do the actual recording. Then you upload the file to your application using a web service or similar.
And mp3 is sort of a standard file format for sound on the web. So I'd go with that.
Have a look at these projects:
http://www.codeproject.com/KB/winsdk/SoundRecord.aspx
http://www.codeproject.com/Articles/67568/Creating-a-Sound-Recorder-in-C-and-Csharp.aspx
http://www.codeproject.com/KB/audio-video/cswavrec.aspx
What is the best option if i have to save the audio online in terms of the file occupying storage space.
May be real media (.rm).
Any particular format that the file should be saved in for optimum output.
Not sure but I think that depends on
your player.
You might also be interested in ffmpeg for converting the media and its c# wrapper library.

Categories

Resources