Changeset 4607:d00a1ae1f387 in roaraudio


Ignore:
Timestamp:
11/21/10 00:15:22 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

Added RSound's new 32 bit support to libroarrsound

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r4602 r4607  
    66        * Added codecfilter for FLAC (read-only, native FLAC). 
    77        * Use libroar's MIME Type lookup functions (Closes: #56) 
     8        * Added RSound's new 32 bit support to libroarrsound 
    89 
    910v. 0.4beta1 - Mon Nov 01 2010 16:14 CET 
  • libroarrsound/libroarrsound.c

    r4221 r4607  
    3333#include "libroarrsound.h" 
    3434 
     35#if defined(RSD_S32_LE) && defined(RSD_S32_BE) && defined(RSD_S32_NE) && defined(RSD_U32_LE) && defined(RSD_U32_BE) && defined(RSD_U32_NE) 
     36#define _HAVE_32BIT_SUPPORT 
     37#endif 
     38 
    3539static size_t libroarrsound_fmt2fs (enum rsd_format format) { 
    3640 switch (format) { 
     41#ifdef _HAVE_32BIT_SUPPORT 
     42  case RSD_S32_LE: 
     43  case RSD_S32_BE: 
     44  case RSD_S32_NE: 
     45  case RSD_U32_LE: 
     46  case RSD_U32_BE: 
     47  case RSD_U32_NE: 
     48    return 32; 
     49   break; 
     50#endif 
    3751  case RSD_S16_LE: 
    3852  case RSD_S16_BE: 
     
    282296 switch (self->rsound.format) { 
    283297  case RSD_S16_LE: 
     298  case RSD_S32_LE: 
    284299    codec = ROAR_CODEC_PCM_S_LE; 
    285300   break; 
    286301  case RSD_S16_BE: 
     302  case RSD_S32_BE: 
    287303    codec = ROAR_CODEC_PCM_S_BE; 
    288304   break; 
    289305  case RSD_S16_NE: 
     306  case RSD_S32_NE: 
    290307    codec = ROAR_CODEC_PCM_S; 
    291308   break; 
    292309  case RSD_U16_LE: 
     310  case RSD_U32_LE: 
    293311    codec = ROAR_CODEC_PCM_U_LE; 
    294312   break; 
    295313  case RSD_U16_BE: 
     314  case RSD_U32_BE: 
    296315    codec = ROAR_CODEC_PCM_U_BE; 
    297316   break; 
    298317  case RSD_U16_NE: 
     318  case RSD_U32_NE: 
    299319    codec = ROAR_CODEC_PCM_U; 
    300320   break; 
    301321  case RSD_S8: 
    302322    codec = ROAR_CODEC_PCM_S; 
    303     bits  = 8; 
    304323   break; 
    305324  case RSD_U8: 
    306325    codec = ROAR_CODEC_PCM_U; 
    307     bits  = 8; 
    308326   break; 
    309327  case RSD_ALAW: 
    310328    codec = ROAR_CODEC_ALAW; 
    311     bits  = 8; 
    312329   break; 
    313330  case RSD_MULAW: 
    314331    codec = ROAR_CODEC_MULAW; 
    315     bits  = 8; 
    316332   break; 
    317333  default: 
     
    319335   break; 
    320336 } 
     337 
     338 bits = libroarrsound_fmt2fs(self->rsound.format); 
    321339 
    322340 ROAR_DBG("rsd_start(rd=%p) = ?", rd); 
Note: See TracChangeset for help on using the changeset viewer.