RecordingDevice.cpp 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /**
  2. * Copyright (c) 2006-2016 LOVE Development Team
  3. *
  4. * This software is provided 'as-is', without any express or implied
  5. * warranty. In no event will the authors be held liable for any damages
  6. * arising from the use of this software.
  7. *
  8. * Permission is granted to anyone to use this software for any purpose,
  9. * including commercial applications, and to alter it and redistribute it
  10. * freely, subject to the following restrictions:
  11. *
  12. * 1. The origin of this software must not be misrepresented = 0; you must not
  13. * claim that you wrote the original software. If you use this software
  14. * in a product, an acknowledgment in the product documentation would be
  15. * appreciated but is not required.
  16. * 2. Altered source versions must be plainly marked as such, and must not be
  17. * misrepresented as being the original software.
  18. * 3. This notice may not be removed or altered from any source distribution.
  19. **/
  20. #include "RecordingDevice.h"
  21. #include "Audio.h"
  22. namespace love
  23. {
  24. namespace audio
  25. {
  26. namespace null
  27. {
  28. const char *RecordingDevice::name = "null";
  29. RecordingDevice::RecordingDevice(const char *)
  30. {
  31. }
  32. RecordingDevice::~RecordingDevice()
  33. {
  34. }
  35. bool RecordingDevice::startRecording()
  36. {
  37. return false;
  38. }
  39. bool RecordingDevice::startRecording(int, int, int, int)
  40. {
  41. return false;
  42. }
  43. void RecordingDevice::stopRecording()
  44. {
  45. }
  46. love::sound::SoundData *RecordingDevice::getData()
  47. {
  48. return nullptr;
  49. }
  50. int RecordingDevice::getSampleCount() const
  51. {
  52. return 0;
  53. }
  54. int RecordingDevice::getSampleRate() const
  55. {
  56. return 8000;
  57. }
  58. int RecordingDevice::getBitDepth() const
  59. {
  60. return 16;
  61. }
  62. int RecordingDevice::getChannels() const
  63. {
  64. return 1;
  65. }
  66. const char *RecordingDevice::getName() const
  67. {
  68. return name;
  69. }
  70. bool RecordingDevice::isRecording() const
  71. {
  72. return false;
  73. }
  74. } //null
  75. } //audio
  76. } //love