Rockbox Development > Starting Development and Compiling

one question for bps openning audio

<< < (2/2)

powerpan:
found that the BPS was no need for rockbox because all output is clipped to 16bit output.

saratoga:

--- Quote from: powerpan on May 15, 2011, 07:46:25 AM ---found that the BPS was no need for rockbox because all output is clipped to 16bit output.


--- End quote ---

Correct.   Like you said a couple weeks ago, we have 16 bit DACs. 

powerpan:
I was confusing while reading rockbox's codes, why shift up and down....
memcpy in system causes much CPU time because CPU always waits the memory ready..

the API design is good and I found a way to get the real BPS from codec already without rewriting the CODECs.

and metadata got mp4 filesize wrong, and don't know why in rockbox space, ci->filesize has 2 copies.. one is right and one is wrong by get_mp4_metadata function..

saratoga:

--- Quote from: powerpan on May 18, 2011, 12:09:17 PM ---the API design is good and I found a way to get the real BPS from codec already without rewriting the CODECs.

--- End quote ---

Let me guess:  its always 32 bits ;)

powerpan:
my output always set to 24bit, how to upload a picture?

        if (snd_card.bps_tested<BPS_TEST_TIME)      // test real bps from the decoder
        {
           temp |= data0;
         if (snd_card.stereo_mode == STEREO_NONINTERLEAVED)
            temp |= data1;
        }


........

   if (snd_card.bps_tested<BPS_TEST_TIME)
   {
      if (temp)         // there is valid sound data
      {
         snd_card.dataLR |= temp;
         //printf("dataLR:%x, iTimecnt:%d\n", snd_card.dataLR, snd_card.bps_tested);
         snd_card.bps_tested ++;
      }
      
      if (snd_card.bps_tested==BPS_TEST_TIME)
      {
         //printf("\nsound output bps:%d\n", snd_card.bps);
         temp = 0xfffffffe;
         for (i=23;i>8;i--)      // test to 8 bit is enough
         {
            //printf("temp=:%lx, dataLR:%lx, data0:%lx\n", (unsigned int)temp, (unsigned int)snd_card.dataLR, (unsigned int)data0);
            data0 = snd_card.dataLR & temp;
            if (data0==snd_card.dataLR)
               snd_card.bps = i;

            temp <<= 1;         // for the next test
         }
         printf("\nreal bps detected:%d\n", snd_card.bps);
         
         //exit(1);   ////debug
      }
   }

Navigation

[0] Message Index

[*] Previous page

Go to full version