/flash/flash-audio/src/com/ryanberdeen/audio/ISampleSource.as
http://echo-nest-remix.googlecode.com/ · ActionScript · 26 lines · 8 code · 4 blank · 14 comment · 0 complexity · 5cfba65908a57f103fa7689bfdf2856d MD5 · raw file
- /*
- * Copyright 2009 Ryan Berdeen. All rights reserved.
- * Distributed under the terms of the MIT License.
- * See accompanying file LICENSE.txt
- */
- package com.ryanberdeen.audio {
- import flash.utils.ByteArray;
- /**
- * An abstraction over the <code>Sound.extract()</code> method.
- */
- public interface ISampleSource {
- function extract(target:ByteArray, length:Number, startPosition:Number = -1):Number;
- /**
- * Converts a linear sample offset to a source sample offset.
- */
- function toSourcePosition(position:Number):Number;
- /**
- * The number of samples in the source.
- */
- function get length():Number;
- }
- }