Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Concatenate MP3 Files
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Alessandro Angeli [MVP::DigitalMedia]  
View profile  
 More options Jan 28 2006, 3:53 pm
Newsgroups: microsoft.public.win32.programmer.directx.audio
From: "Alessandro Angeli [MVP::DigitalMedia]" <nob...@nowhere.in.the.net>
Date: Sat, 28 Jan 2006 21:53:17 +0100
Local: Sat, Jan 28 2006 3:53 pm
Subject: Re: Concatenate MP3 Files

Mark A. Richman wrote:
> I'm actuallly having more trouble with the array
> definitions. For example, I have tried declaring the
> bitrates array two ways:

> int[,,] bitrates = new int[4,4,16] and
> int[][][] bitrates = new int[4][4][16]

> neither of which are working too well. I can paste the
> whole block of code if you like.

This is a jagged array:

 /// [4 /* version */][4 /* layer */][16 /* bitrate */]
 private static readonly int[][][] bitrates = {
  new int[][] { /* V2.5 */
   /* L0 */ new int[] { 0, },
   /* L3 */ new int[] { 0, },
   /* L2 */ new int[] { 0, },
   /* L1 */ new int[] { 0, },
  },
  new int[][] { /* V0.0 */
   /* L0 */ new int[] { 0, },
   /* L3 */ new int[] { 0, },
   /* L2 */ new int[] { 0, },
   /* L1 */ new int[] { 0, },
  },
  new int[][] { /* V2.0 */
   /* L0 */ new int[] { 0, },
   /* L3 */ new int[] { 0, },
   /* L2 */ new int[] { 0, },
   /* L1 */ new int[] { 0, },
  },
  new int[][] { /* V1.0 */
   /* L0 */ new int[] { 0, },
   /* L3 */ new int[] { 0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1,  },
   /* L2 */ new int[] { 0, },
   /* L1 */ new int[] { 0, },
  },
 };

However, this is necessary only because the table is incomplete and I used an abbreviated syntax. If you fill in the whole table (look at the articles I gave you the links to in the second reference), the array won't be jagged anymore and you can more easily initialize it:

 /// [4 /* version */][4 /* layer */][16 /* bitrate */]
 private static readonly int[,,] bitrates = {
  { /* V2.5 */
   /* L0 */ { 0,  1,  2,  3,  4,  5,  6,  7,   8,   9,  10,  11,  12,  13,  14, -1, },
   /* L3 */ { 0,  1,  2,  3,  4,  5,  6,  7,   8,   9,  10,  11,  12,  13,  14, -1, },
   /* L2 */ { 0,  1,  2,  3,  4,  5,  6,  7,   8,   9,  10,  11,  12,  13,  14, -1, },
   /* L1 */ { 0,  1,  2,  3,  4,  5,  6,  7,   8,   9,  10,  11,  12,  13,  14, -1, },
  },
  { /* V0.0 */
   /* L0 */ { 0,  1,  2,  3,  4,  5,  6,  7,   8,   9,  10,  11,  12,  13,  14, -1, },
   /* L3 */ { 0,  1,  2,  3,  4,  5,  6,  7,   8,   9,  10,  11,  12,  13,  14, -1, },
   /* L2 */ { 0,  1,  2,  3,  4,  5,  6,  7,   8,   9,  10,  11,  12,  13,  14, -1, },
   /* L1 */ { 0,  1,  2,  3,  4,  5,  6,  7,   8,   9,  10,  11,  12,  13,  14, -1, },
  },
  { /* V2.0 */
   /* L0 */ { 0,  1,  2,  3,  4,  5,  6,  7,   8,   9,  10,  11,  12,  13,  14, -1, },
   /* L3 */ { 0,  1,  2,  3,  4,  5,  6,  7,   8,   9,  10,  11,  12,  13,  14, -1, },
   /* L2 */ { 0,  1,  2,  3,  4,  5,  6,  7,   8,   9,  10,  11,  12,  13,  14, -1, },
   /* L1 */ { 0,  1,  2,  3,  4,  5,  6,  7,   8,   9,  10,  11,  12,  13,  14, -1, },
  },
  { /* V1.0 */
   /* L0 */ { 0,  1,  2,  3,  4,  5,  6,  7,   8,   9,  10,  11,  12,  13,  14, -1, },
   /* L3 */ { 0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1, },
   /* L2 */ { 0,  1,  2,  3,  4,  5,  6,  7,   8,   9,  10,  11,  12,  13,  14, -1, },
   /* L1 */ { 0,  1,  2,  3,  4,  5,  6,  7,   8,   9,  10,  11,  12,  13,  14, -1, },
  },
 };

> Aside from the TAG block at the end of the MP3 file, I
> also see lots of header data. Do I need to alter/cut that
> out too when concatenating two streams?

What do you mean?

--
// Alessandro Angeli
// MVP :: Digital Media
// a dot angeli at psynet dot net


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google