Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
convert c code python
#1
Hi friends,

Below is my C code
void WaveFormsBuffer::FillOutputWaveFormBufferData(char *pBuffer,int nBuffsize,uint16_t nConfig)
{
        short pchannelsBuffer[7][1024];
        short *pData = (short*)pBuffer;

        for(int i=0;i <((nBuffsize/2)/7);i++ )
        {
            for(int j=0;j <MAX_NUM_WAV_FILES;j++)
            {
                pchannelsBuffer[j][i] = *pData++;
            }
        }

   for(int k=0;k <MAX_NUM_WAV_FILES ; k++)
            {
                fwrite(&pchannelsBuffer[k][0],(nBuffsize/7),1,m_pFp[k]);
    }
}
this is my code I want to convert to python can anybody can help with coding I am new to python
Reply


Messages In This Thread
convert c code python - by satyanarayana - Sep-17-2021, 12:12 PM
RE: convert c code python - by jefsummers - Sep-17-2021, 06:12 PM
RE: convert c code python - by deanhystad - Sep-20-2021, 03:32 PM
RE: convert c code python - by satyanarayana - Sep-21-2021, 05:19 AM
RE: convert c code python - by deanhystad - Sep-21-2021, 07:45 PM
file write - by satyanarayana - Sep-20-2021, 12:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Review my code: convert a HTTP date header to a datetime object stevendaprano 1 2,010 Dec-17-2022, 12:24 AM
Last Post: snippsat
  How to convert a python code to binary? rsurathu 0 1,809 Aug-02-2020, 08:09 AM
Last Post: rsurathu
  Error in the code ->ValueError: could not convert string to float: ' ' eagleboom 1 3,227 Nov-29-2019, 06:19 AM
Last Post: ThomasL
  Can someone please help me convert this simple C ROT cipher code to Python code? boohoo9 5 3,460 Jun-14-2019, 03:02 PM
Last Post: DeaD_EyE
  code help to convert log file to csv format bmunagala 3 12,163 Jan-21-2019, 06:08 PM
Last Post: snippsat
  Convert arduino code to python JDutch 3 22,739 Nov-07-2018, 09:16 PM
Last Post: Larz60+
  Convert C code to Python code lostMarbles 6 32,721 Sep-19-2018, 06:23 AM
Last Post: pcsailor
  convert v2 code to v3 pandeyrajeev80 2 2,698 Aug-23-2018, 11:12 AM
Last Post: DeaD_EyE
  How to convert matlab code to python? Ricop522 0 5,228 Jan-13-2018, 01:55 AM
Last Post: Ricop522
  Looking code to convert my strings of line in Dict santosh 1 2,648 Nov-10-2017, 04:49 PM
Last Post: heiner55

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020