Esempio n. 1
0
        public SplitTrackList InitTracks(VinylRipOptions options)
        {
            List <SfAudioMarker> trackRegions = GetTrackRegions();

            SetListBounds(trackRegions.Count);
            for (int trackNumber = trackRegions.Count; trackNumber > 0; trackNumber--)
            {
                SfAudioMarker trackRegion = trackRegions[trackNumber - 1];
                AddNew(trackRegion, trackNumber, options);
            }
            return(this);
        }
Esempio n. 2
0
 public SplitTrackDefinition(
     SplitTrackList splitTrackList,
     ISfFileHost file,
     VinylRipOptions options,
     ICreateFadeMarkers markerFactory,
     ICreateTrackRegions regionFactory,
     IOutputHelper output)
 {
     _options                = options;
     _splitTrackList         = splitTrackList;
     _originalFile           = file;
     _markerFactory          = markerFactory;
     _regionFactory          = regionFactory;
     _output                 = output;
     _trackRegionMarker      = new SfAudioMarker();
     _trackRegionMarker.Type = MarkerType.Region;
 }
Esempio n. 3
0
        public SplitTrackDefinition AddNew(SfAudioMarker trackRegionMarker, int trackNumber, VinylRipOptions options)
        {
            SplitTrackDefinition track = new SplitTrackDefinition(this, _file, options, _markerFactory, _regionFactory, _output);

            this[trackNumber - 1] = track;
            track.Number          = trackNumber;
            track.TrackRegion     = trackRegionMarker;
            track.FadeInEndMarker = GetTrackFadeInEndMarker(track.Number, options.DefaultTrackFadeInLengthInSamples);
            var fadeOutLengthInSamples = _file.SecondsToPosition(options.DefaultTrackFadeOutLengthInSeconds);

            track.FadeOutEndMarker = GetTrackFadeOutEndMarker(track.Number, fadeOutLengthInSamples);
            return(track);
        }