mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-11-03 21:20:31 -05:00 
			
		
		
		
	Sample MO FIFO: method to resize data vectors
This commit is contained in:
		
							parent
							
								
									c04369f4f1
								
							
						
					
					
						commit
						08eaca8c0c
					
				@ -38,6 +38,22 @@ void SampleMOFifo::init(unsigned int nbStreams, unsigned int size)
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void SampleMOFifo::resize(unsigned int size)
 | 
			
		||||
{
 | 
			
		||||
    m_size = size;
 | 
			
		||||
	m_readCount = 0;
 | 
			
		||||
    m_readHead = 0;
 | 
			
		||||
    m_writeHead = size/8;
 | 
			
		||||
 | 
			
		||||
    for (unsigned int stream = 0; stream < m_nbStreams; stream++)
 | 
			
		||||
    {
 | 
			
		||||
        m_data[stream].resize(size);
 | 
			
		||||
        m_vReadCount.push_back(0);
 | 
			
		||||
        m_vReadHead.push_back(0);
 | 
			
		||||
        m_vWriteHead.push_back(size/8);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
SampleMOFifo::SampleMOFifo(QObject *parent) :
 | 
			
		||||
    QObject(parent),
 | 
			
		||||
    m_nbStreams(0),
 | 
			
		||||
 | 
			
		||||
@ -31,6 +31,7 @@ public:
 | 
			
		||||
    SampleMOFifo(unsigned int nbStreams, unsigned int size, QObject *parent = nullptr);
 | 
			
		||||
    ~SampleMOFifo();
 | 
			
		||||
    void init(unsigned int nbStreams, unsigned int size);
 | 
			
		||||
    void resize(unsigned int size);
 | 
			
		||||
    void reset();
 | 
			
		||||
 | 
			
		||||
    void readSync(
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user