Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 407857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:38:09+00:00 2026-05-12T17:38:09+00:00

I’d like write cues (i.e. time-based markers, not ID3-like tags) to a WAV file

  • 0

I’d like write cues (i.e. time-based markers, not ID3-like tags) to a WAV file with C#. It seems that the free .NET audio libraries such as NAudio and Bass.NET don’t support this.

I’ve found the source of Cue Tools, but it’s entirely undocumented and relatively complex. Any alternatives?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T17:38:09+00:00Added an answer on May 12, 2026 at 5:38 pm

    Here’s a link that explains the format of a cue chunk in a WAV file:

    http://www.sonicspot.com/guide/wavefiles.html#cue

    Because a WAV file uses the RIFF format, you can simply append the cue chunk to the end of an existing WAV file. To do this in .Net, you would open a System.IO.FileStream object, using the constructor that takes a path and a FileMode (you would use FileMode.Append for this purpose). You would then create a BinaryWriter from your FileStream, and use it to write the cue chunk itself.

    Here is a rough code sample to append a cue chunk with a single cue point to the end of a WAV file:

    System.IO.FileStream fs = 
        new System.IO.FileStream(@"c:\sample.wav", 
        System.IO.FileMode.Append);
    System.IO.BinaryWriter bw = new System.IO.BinaryWriter(fs);
    char[] cue = new char[] { 'c', 'u', 'e', ' ' };
    bw.Write(cue, 0, 4); // "cue "
    bw.Write((int)28); // chunk size = 4 + (24 * # of cues)
    bw.Write((int)1); // # of cues
    // first cue point
    bw.Write((int)0); // unique ID of first cue
    bw.Write((int)0); // position
    char[] data = new char[] { 'd', 'a', 't', 'a' };
    bw.Write(data, 0, 4); // RIFF ID = "data"
    bw.Write((int)0); // chunk start
    bw.Write((int)0); // block start
    bw.Write((int)500); // sample offset - in a mono, 16-bits-per-sample WAV
    // file, this would be the 250th sample from the start of the block
    bw.Close();
    fs.Dispose();
    

    Note: I have never used or tested this code, so I am not sure if it works quite right. It is just intended to give you a rough idea of how to write this in C#.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.