want to swap a digital pin for analog pin in existing library

I’m working with the IR Library from Ken Shirriff A Multi-Protocol Infrared Remote Library for the Arduino
It appears that my IR demodulator is spitting out a signal that is too weak to be read correctly by the default digital pin (my meter is basically showing less than 1v when I send a signal) so I thought maybe I could feed this to an analog pin and adjust the “reference point” instead. I’m not clear on how to do this code-wise. It seems that I need to use an if statement and fill a variable with the result but then I need some kind of polling loop to keep the signal updated. Maybe a simple way to ask is if there is an easy way to adjust the threshold of a digital input (either via a digital pin or analog).
btw, I’m new here. I spent some time trying to search the forum but found that the search system here is a bit difficult. Google is definitely better but I haven’t yet found what I’m looking for.

Using Arduino nano 3.1

If your IR demodulator is not producing solid 5V pulses you probably have the wrong device.

Thanks for the reply. I have indeed found that a couple of the IR receivers that I have (Buffalo and some no-name) don't seem to be demodulators. Their output voltage on a dmm varies with how much light I let into the eye. The one that I think should actually work is an older Niles brand item and I have a few of them. They seem to be putting out voltage on the dmm that corresponds with a button press and no voltage when there is no button press. But the peak voltage does not appear to break 1v in output despite the 12v supply voltage. I probably need to look at this on a scope but thought I would probe into the arduino workings a bit further and see if I can learn a few things first.

Because the signal is made of a short burst of pulses it is likely the DMM will show a low voltage.

It is unusual to use a 12V supply on the IR demodulator. Usually the older ones run on 5V and the newer ones on 3.3V.

I found a xantech IR receiver and wired it in. After putzing with it for a little while I found that the arduino would respond to it's signals when my dmm leads were across the pin to ground connection. So, I wired a 2.2M resistor as a pull down and it works. This receiver does show higher voltages on the dmm than the Niles unit did (up to 2.5v or so). Unfortunately, I don't seem to be getting consistent codes in the serial monitor feedback. The exact same command will always show the same number of bits and contains most of the same numbers but I don't think I've seen the same exact string of numbers 2 times in a row. btw, the receivers I'm using are fully enclosed pieces designed for AV installations where 12v is the standard. It wasn't initially apparent to me that not all of these receiver systems are actually demodulating the signal. I think I'm going to want to use a wired connection (skipping the IR portion altogether) for the input so I am going to have to figure out how to make a demodulator. But, to bring this back to my first question, and this is just for my overall arduino understanding, is there an easy way (or best practices way) to use an analog pin as a digital pin but with the added advantage of having a variable threshold?

Thanks for the help. I appreciate the feedback on my thinking and process.