Read sample rate directly from control transfer to eliminate callback.
This commit is contained in:
		@@ -407,9 +407,8 @@ bool tud_audio_get_req_entity_cb(uint8_t rhport, tusb_control_request_t const *
 | 
			
		||||
        {
 | 
			
		||||
          case AUDIO_CS_REQ_CUR:
 | 
			
		||||
            TU_LOG2("    Get Sample Freq.\r\n");
 | 
			
		||||
            // Set sample rate for flow control
 | 
			
		||||
            tud_audio_set_tx_flow_control(sampFreq);
 | 
			
		||||
            return tud_control_xfer(rhport, p_request, &sampFreq, sizeof(sampFreq));
 | 
			
		||||
            // Buffered control transfer is needed for IN flow control to work
 | 
			
		||||
            return tud_audio_buffer_and_schedule_control_xfer(rhport, p_request, &sampFreq, sizeof(sampFreq));
 | 
			
		||||
 | 
			
		||||
          case AUDIO_CS_REQ_RANGE:
 | 
			
		||||
            TU_LOG2("    Get Sample Freq. range\r\n");
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user