FreeCalypso > hg > themwi-rtp-lib
comparison src/twjit_out.c @ 12:323957bebd53
twjit: smarter counting of underruns
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 06 Jul 2024 02:47:21 +0000 |
parents | 4f82b9c07ddb |
children |
comparison
equal
deleted
inserted
replaced
11:4f82b9c07ddb | 12:323957bebd53 |
---|---|
89 twjit->read_sb = twjit->write_sb; | 89 twjit->read_sb = twjit->write_sb; |
90 return pull_from_read_sb(twjit); | 90 return pull_from_read_sb(twjit); |
91 case TWJIT_STATE_FLOWING: | 91 case TWJIT_STATE_FLOWING: |
92 if (read_sb_is_empty(twjit)) { | 92 if (read_sb_is_empty(twjit)) { |
93 twjit->state = TWJIT_STATE_EMPTY; | 93 twjit->state = TWJIT_STATE_EMPTY; |
94 twjit->stats.underruns++; | |
95 return NULL; | 94 return NULL; |
96 } | 95 } |
97 read_sb_thinning(twjit); | 96 read_sb_thinning(twjit); |
98 return pull_from_read_sb(twjit); | 97 return pull_from_read_sb(twjit); |
99 case TWJIT_STATE_HANDOVER: | 98 case TWJIT_STATE_HANDOVER: |
104 twjit->read_sb = twjit->write_sb; | 103 twjit->read_sb = twjit->write_sb; |
105 return pull_from_read_sb(twjit); | 104 return pull_from_read_sb(twjit); |
106 } | 105 } |
107 if (read_sb_is_empty(twjit)) { | 106 if (read_sb_is_empty(twjit)) { |
108 twjit->state = TWJIT_STATE_HUNT; | 107 twjit->state = TWJIT_STATE_HUNT; |
109 twjit->stats.underruns++; | 108 twjit->stats.ho_underruns++; |
110 return NULL; | 109 return NULL; |
111 } | 110 } |
112 read_sb_thinning(twjit); | 111 read_sb_thinning(twjit); |
113 return pull_from_read_sb(twjit); | 112 return pull_from_read_sb(twjit); |
114 default: | 113 default: |