DataSource.m 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /**********************************************************************************
  2. AudioPlayer.m
  3. Created by Thong Nguyen on 14/05/2012.
  4. https://github.com/tumtumtum/audjustable
  5. Copyright (c) 2012 Thong Nguyen (tumtumtum@gmail.com). All rights reserved.
  6. Redistribution and use in source and binary forms, with or without
  7. modification, are permitted provided that the following conditions are met:
  8. 1. Redistributions of source code must retain the above copyright
  9. notice, this list of conditions and the following disclaimer.
  10. 2. Redistributions in binary form must reproduce the above copyright
  11. notice, this list of conditions and the following disclaimer in the
  12. documentation and/or other materials provided with the distribution.
  13. 3. All advertising materials mentioning features or use of this software
  14. must display the following acknowledgement:
  15. This product includes software developed by Thong Nguyen (tumtumtum@gmail.com)
  16. 4. Neither the name of Thong Nguyen nor the
  17. names of its contributors may be used to endorse or promote products
  18. derived from this software without specific prior written permission.
  19. THIS SOFTWARE IS PROVIDED BY Thong Nguyen ''AS IS'' AND ANY
  20. EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  21. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  22. DISCLAIMED. IN NO EVENT SHALL THONG NGUYEN BE LIABLE FOR ANY
  23. DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  24. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  25. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  26. ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  27. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  28. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  29. **********************************************************************************/
  30. #import "DataSource.h"
  31. @implementation DataSource
  32. @synthesize delegate;
  33. -(long long) length
  34. {
  35. return 0;
  36. }
  37. -(void) seekToOffset:(long long)offset
  38. {
  39. }
  40. -(int) readIntoBuffer:(UInt8*)buffer withSize:(int)size
  41. {
  42. return -1;
  43. }
  44. -(long long) position
  45. {
  46. return 0;
  47. }
  48. -(BOOL) registerForEvents:(NSRunLoop*)runLoop
  49. {
  50. return NO;
  51. }
  52. -(void) unregisterForEvents
  53. {
  54. }
  55. -(void) close
  56. {
  57. }
  58. -(BOOL) hasBytesAvailable
  59. {
  60. return NO;
  61. }
  62. -(AudioFileTypeID) audioFileTypeHint
  63. {
  64. return 0;
  65. }
  66. @end