Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Something
Friday, April 22nd, 2011 at 3:56:49pm UTC 

  1. Index: firmware/export/audiohw.h
  2. ===================================================================
  3. --- firmware/export/audiohw.h   (revision 29594)
  4. +++ firmware/export/audiohw.h   (working copy)
  5. @@ -338,6 +338,7 @@
  6.      SOUND_CHAN_MONO_LEFT,
  7.      SOUND_CHAN_MONO_RIGHT,
  8.      SOUND_CHAN_KARAOKE,
  9. +    SOUND_CHAN_SWAP,
  10.      SOUND_CHAN_NUM_MODES,
  11.  };
  12.  
  13. Index: apps/lang/english.lang
  14. ===================================================================
  15. --- apps/lang/english.lang      (revision 29594)
  16. +++ apps/lang/english.lang      (working copy)
  17. @@ -12744,3 +12744,20 @@
  18.      *: "In custom directories only"
  19.    </voice>
  20.  </phrase>
  21. +<phrase>
  22. +  id: LANG_CHANNEL_SWAP
  23. +  desc: in sound_settings
  24. +  user: core
  25. +  <source>
  26. +    *: none
  27. +    swcodec: "Swap channels"
  28. +  </source>
  29. +  <dest>
  30. +    *: none
  31. +    swcodec: "Swap channels"
  32. +  </dest>
  33. +  <voice>
  34. +    *: none
  35. +    swcodec: "Swap channels"
  36. +  </voice>
  37. +</phrase>
  38. Index: apps/dsp.c
  39. ===================================================================
  40. --- apps/dsp.c  (revision 29594)
  41. +++ apps/dsp.c  (working copy)
  42. @@ -1116,6 +1116,18 @@
  43.  }
  44.  #endif /* DSP_HAVE_ASM_SOUND_CHAN_KARAOKE */
  45.  
  46. +static void channels_process_sound_chan_swap(int count, int32_t *buf[])
  47. +{
  48. +    int32_t *sl = buf[0], *sr = buf[1];
  49. +
  50. +    while (count-- > 0)
  51. +    {
  52. +        int32_t ch = *sl;
  53. +        *sl++ = *sr;
  54. +        *sr++ = ch;
  55. +    }
  56. +}
  57. +
  58.  static void dsp_set_channel_config(int value)
  59.  {
  60.      static const channels_process_fn_type channels_process_functions[] =
  61. @@ -1127,6 +1139,7 @@
  62.          [SOUND_CHAN_MONO_LEFT]  = channels_process_sound_chan_mono_left,
  63.          [SOUND_CHAN_MONO_RIGHT] = channels_process_sound_chan_mono_right,
  64.          [SOUND_CHAN_KARAOKE]    = channels_process_sound_chan_karaoke,
  65. +        [SOUND_CHAN_SWAP]       = channels_process_sound_chan_swap,
  66.      };
  67.  
  68.      if ((unsigned)value >= ARRAYLEN(channels_process_functions) ||
  69. Index: apps/settings_list.c
  70. ===================================================================
  71. --- apps/settings_list.c        (revision 29594)
  72. +++ apps/settings_list.c        (working copy)
  73. @@ -639,11 +639,12 @@
  74.  
  75.      CHOICE_SETTING(F_SOUNDSETTING, channel_config, LANG_CHANNEL_CONFIGURATION,
  76.                     0,"channels",
  77. -                   "stereo,mono,custom,mono left,mono right,karaoke",
  78. -                   sound_set_channels, 6,
  79. +                   "stereo,mono,custom,mono left,mono right,karaoke,swap",
  80. +                   sound_set_channels, 7,
  81.                     ID2P(LANG_CHANNEL_STEREO), ID2P(LANG_CHANNEL_MONO),
  82.                     ID2P(LANG_CHANNEL_CUSTOM), ID2P(LANG_CHANNEL_LEFT),
  83. -                   ID2P(LANG_CHANNEL_RIGHT), ID2P(LANG_CHANNEL_KARAOKE)),
  84. +                   ID2P(LANG_CHANNEL_RIGHT), ID2P(LANG_CHANNEL_KARAOKE),
  85. +                   ID2P(LANG_CHANNEL_SWAP)),
  86.      SOUND_SETTING(F_SOUNDSETTING, stereo_width, LANG_STEREO_WIDTH,
  87.                    "stereo_width", SOUND_STEREO_WIDTH),
  88.  #ifdef AUDIOHW_HAVE_DEPTH_3D

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus
worth-right