lib/core.js
function setSegment(start, end, identifier) {
    if (identifier === undefined || identifier === null || identifier.length === 0) {
      identifier = "default";
    }

    this.segments[identifier] = new WaveformDataSegment(this, start, end);

    return this.segments[identifier];
  }
function setSegment(start, end, identifier) {
    if (identifier === undefined || identifier === null || identifier.length === 0) {
      identifier = "default";
    }

    this.segments[identifier] = new WaveformDataSegment(this, start, end);

    return this.segments[identifier];
  }
function setSegment ( start , end , identifier ) { if ( identifier === undefined || identifier === null || identifier . length === 0 ) { identifier = "default" ; } this . segments [ identifier ] = new WaveformDataSegment ( this , start , end ) ; return this . segments [ identifier ] ; }
Creates a new segment of data.
Pretty handy if you need to bookmark a duration and display it according
to the current offset.

```javascript
var waveform = WaveformData.create({ ... });

console.log(Object.keys(waveform.segments));          // -> []

waveform.set_segment(10, 120);
waveform.set_segment(30, 90, "speakerA");

console.log(Object.keys(waveform.segments));          // -> ['default', 'speakerA']
console.log(waveform.segments.default.min.length);    // -> 110
console.log(waveform.segments.speakerA.min.length);   // -> 60
```

@param {Integer} start Beginning of the segment (inclusive)
@param {Integer} end Ending of the segment (exclusive)
@param {String*} identifier Unique identifier. If nothing is specified,
*default* will be used as a value.
@return {WaveformDataSegment}
Creates a new segment of data . Pretty handy if you need to bookmark a duration and display it according to the current offset .