Configuration.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * Configuration.h
  3. * Copyright © 2012 kbinani
  4. *
  5. * This file is part of vConnect-STAND.
  6. *
  7. * vConnect-STAND is free software; you can redistribute it and/or
  8. * modify it under the terms of the GPL License.
  9. *
  10. * vConnect-STAND is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. */
  14. #ifndef __Configuration_h__
  15. #define __Configuration_h__
  16. #include <list>
  17. #include <string>
  18. namespace vconnect
  19. {
  20. using namespace std;
  21. /**
  22. * vConnect の動作に必要な設定情報を保持するクラス
  23. */
  24. class Configuration
  25. {
  26. public:
  27. /**
  28. * サポートするコードセット名のリストを取得する
  29. * @return コードセット名のリスト
  30. */
  31. static list<string> supportedCodesets()
  32. {
  33. list<string> result;
  34. result.push_back( "Shift_JIS" );
  35. result.push_back( "euc-jp" );
  36. result.push_back( "iso-2022-jp" );
  37. result.push_back( "UTF-8" );
  38. result.push_back( "UTF-16LE" );
  39. result.push_back( "UTF-16BE" );
  40. result.push_back( "UTF-32BE" );
  41. result.push_back( "UTF-32LE" );
  42. return result;
  43. }
  44. /**
  45. * STAND で使用するフレーム単位時間が表す時間を取得する
  46. * @return 1 フレーム時間あたりのミリ秒単位の時間
  47. * @todo review; この doc コメントであってるか?
  48. */
  49. static double getMilliSecondsPerFrame()
  50. {
  51. return 2.0;
  52. }
  53. /**
  54. * 音声のデフォルトのサンプリング周波数を取得する
  55. * @return サンプリング周波数(Hz)
  56. */
  57. static int getDefaultSampleRate()
  58. {
  59. return 44100;
  60. }
  61. private:
  62. Configuration()
  63. {
  64. }
  65. };
  66. }
  67. #endif