Click here to Skip to main content
15,881,588 members
Home / Discussions / C#
   

C#

 
GeneralAccessing data in one assembly from another Pin
ez226-Sep-02 9:30
ez226-Sep-02 9:30 
GeneralRe: Accessing data in one assembly from another Pin
leppie26-Sep-02 10:41
leppie26-Sep-02 10:41 
GeneralCopy of files from one folder to another Pin
Cintch26-Sep-02 6:05
Cintch26-Sep-02 6:05 
GeneralRe: Copy of files from one folder to another Pin
leppie26-Sep-02 10:53
leppie26-Sep-02 10:53 
General[Remoting]No receiver registered Pin
Ricciolo26-Sep-02 5:50
Ricciolo26-Sep-02 5:50 
Generalnull characters when outputing string to file Pin
Humpo26-Sep-02 5:18
Humpo26-Sep-02 5:18 
GeneralRe: null characters when outputing string to file Pin
Stephane Rodriguez.26-Sep-02 5:42
Stephane Rodriguez.26-Sep-02 5:42 
GeneralRe: null characters when outputing string to file Pin
leppie26-Sep-02 11:00
leppie26-Sep-02 11:00 
Hi, I find its easier to just read the last 128bytes from a mp3, then as I did this recently, here's my complete ID3 class Smile | :) Cheers

public class ID3v1Tag //really 1.1 :)
{
	string TAG; //last 3 bytes
	string songtitle; // 30 characters 
	string artist; // 30 characters 
	string album; //30 characters 
	string year; //4 characters 
	string comment; //28 characters
	byte track; // 1 byte, 0 byte b4 that
	byte genre;// 1 byte

	public ID3v1Tag(byte[] block)
	{
		if (block.Length != 128) throw new Exception("Black must be 128 bytes in size");
		TAG = Encoding.Default.GetString(block, 0, 3);
		if (TAG != "TAG") throw new Exception("Not an ID3 v1 tag");
		songtitle = Encoding.Default.GetString(block, 3, 30);
		artist = Encoding.Default.GetString(block, 33, 30);
		album = Encoding.Default.GetString(block, 63, 30);
		year = Encoding.Default.GetString(block, 93, 4);
		comment = Encoding.Default.GetString(block, 97, 28);
		track = block[126];
		genre = block[127];
	}

	public string SongTitle {get {return songtitle;}}
	public string Artist {get {return artist;}}
	public string Album {get {return album;}}
	public string Year {get {return year;}}
	public string Comment {get {return comment;}}
	public int Track {get {return track;}}
	public string Genre {get {return ((GenreType)genre).ToString();}}

	private enum GenreType :byte
	{
		Blues = 0,
		ClassicRock,
		Country,
		Dance,
		Disco,
		Funk,
		Grunge,
		HipHop,
		Jazz,
		Metal,
		NewAge,
		Oldies,
		Other,
		Pop,
		RnB,
		Rap,
		Reggae,
		Rock,
		Techno,
		Industrial,
		Alternative,
		Ska,
		DeathMetal,
		Pranks,
		Soundtrack,
		EuroTechno,
		Ambient,
		TripHop,
		Vocal,
		JazzFunk,
		Fusion,
		Trance,
		Classical,
		Instrumental,
		Acid,
		House,
		Game,
		SoundClip,
		Gospel,
		Noise,
		AlternRock,
		Bass,
		Soul,
		Punk,
		Space,
		Meditative,
		InstrumentalPop,
		InstrumentalRock,
		Ethnic,
		Gothic,
		Darkwave,
		TechnoIndustrial,
		Electronic,
		PopFolk,
		Eurodance,
		Dream,
		SouthernRock,
		Cult,
		Gangsta,
		Top40,
		ChristianRap,
		PopFunk,
		Jungle,
		NativeAmerican,
		Cabaret,
		NewWave,
		Psychadelic,
		Rave,
		Showtunes,
		Trailer,
		LoFi,
		Tribal,
		AcidPunk,
		AcidJazz,
		Polka,
		Retro,
		Musical,
		RocknRoll,
		HardRock,
		None = 255,
	}

}


Give them a chance! Do it for the kittens, dear God, the kittens!
As seen on MS File Transfer: Please enter an integer between 1 and 2.
GeneralRe: null characters when outputing string to file Pin
Humpo27-Sep-02 1:21
Humpo27-Sep-02 1:21 
GeneralRe: null characters when outputing string to file Pin
leppie27-Sep-02 2:27
leppie27-Sep-02 2:27 
GeneralRe: null characters when outputing string to file Pin
Humpo27-Sep-02 3:59
Humpo27-Sep-02 3:59 
GeneralIncomplete information when exception is thrown Pin
567890123425-Sep-02 21:33
567890123425-Sep-02 21:33 
GeneralData type list for WinAPI use Pin
Raiko25-Sep-02 19:20
Raiko25-Sep-02 19:20 
GeneralRe: Data type list for WinAPI use Pin
Stephane Rodriguez.25-Sep-02 20:09
Stephane Rodriguez.25-Sep-02 20:09 
GeneralRe: Data type list for WinAPI use Pin
Mazdak25-Sep-02 20:26
Mazdak25-Sep-02 20:26 
GeneralRe: Data type list for WinAPI use Pin
leppie26-Sep-02 0:40
leppie26-Sep-02 0:40 
GeneralRe: Data type list for WinAPI use Pin
Raiko26-Sep-02 6:08
Raiko26-Sep-02 6:08 
GeneralRe: Data type list for WinAPI use Pin
Stephane Rodriguez.26-Sep-02 6:38
Stephane Rodriguez.26-Sep-02 6:38 
GeneralRe: Data type list for WinAPI use Pin
leppie26-Sep-02 7:12
leppie26-Sep-02 7:12 
Questionhow can i convert VC++6 's Resources files to C# 's Resources Pin
bclangren25-Sep-02 18:31
bclangren25-Sep-02 18:31 
AnswerRe: how can i convert VC++6 's Resources files to C# 's Resources Pin
Stephane Rodriguez.25-Sep-02 20:27
Stephane Rodriguez.25-Sep-02 20:27 
GeneralApplication.StartupPath.ToString(); Pin
Nick Parker25-Sep-02 17:25
protectorNick Parker25-Sep-02 17:25 
GeneralRe: Application.StartupPath.ToString(); Pin
James McCutcheon25-Sep-02 19:59
James McCutcheon25-Sep-02 19:59 
QuestionOutputDebugString or its ? Pin
imran_rafique25-Sep-02 12:18
imran_rafique25-Sep-02 12:18 
AnswerRe: OutputDebugString or its ? Pin
Paul Riley25-Sep-02 12:32
Paul Riley25-Sep-02 12:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.