AFSoundQueue.h 1012 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // AFSoundQueue.h
  3. // AFSoundManager-Demo
  4. //
  5. // Created by Alvaro Franco on 21/01/15.
  6. // Copyright (c) 2015 AlvaroFranco. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "AFSoundPlayback.h"
  10. #import "AFSoundItem.h"
  11. @interface AFSoundQueue : NSObject
  12. typedef void (^feedbackBlock)(AFSoundItem *item);
  13. typedef void (^itemFinishedBlock)(AFSoundItem *nextItem);
  14. -(id)initWithItems:(NSArray *)items;
  15. @property (nonatomic) AFSoundStatus status;
  16. -(void)addItem:(AFSoundItem *)item;
  17. -(void)addItem:(AFSoundItem *)item atIndex:(NSInteger)index;
  18. -(void)removeItem:(AFSoundItem *)item;
  19. -(void)removeItemAtIndex:(NSInteger)index;
  20. -(void)clearQueue;
  21. -(void)playCurrentItem;
  22. -(void)pause;
  23. -(void)playNextItem;
  24. -(void)playPreviousItem;
  25. -(void)playItem:(AFSoundItem *)item;
  26. -(void)playItemAtIndex:(NSInteger)index;
  27. -(AFSoundItem *)getCurrentItem;
  28. -(NSInteger)indexOfCurrentItem;
  29. -(void)listenFeedbackUpdatesWithBlock:(feedbackBlock)block andFinishedBlock:(itemFinishedBlock)finishedBlock;
  30. @end